Archive for June, 2009

8th June 2009

Monday, June 8th, 2009

Direction:                   Long

Outcome:                   -$181.10 (USD)

Balance:                     $10,231  (AUD)

Drawdown:                16 trading days

I traded my plan correctly today, but it was a losing trade.

Sorry I’m late back…!

Sunday, June 7th, 2009

I know I promised to be back on the job on June 1st, and I apologise for not keeping you up to date. The fact is I was just too snowed under to trade last week. Apart from being away for a couple of days, I was busy with clients, AND writing a computer program to automate my trading process.

This program has turned out to be a massive task for me. I’m a computer guy from way back when, but I wasn’t familiar with the Java programming language, so I had to begin by teaching myself how to use it. 

IB provide something called a Java API which is an interface to their TWS trading platform. It consists of a package of Java classes which you can download and use in your own program to talk to TWS. Again, not being familiar with Java programming – or any other programming for the last several years – it has taken a long time to get to grips with this API. Now that I have, I really think IB has done a good job with it.

So where am I at?  I wrote one program which kind of worked, but which I wasn’t very proud of. It was definitely not an example of elegant computer programming, but it was a great learning exercise. Now I’m about two thirds through building a much more robust program, which is looking promising in early testing.

I’ve been contemplating writing a program like this for a long time, but have been put off by the sheer complexity of the task. However, now that I’ve made a start, I’m determined to see it through. If you’ve ever done any programming, you’ll appreciate that it involves weeks of work, and lots of frustration solving the more subtle programming "bugs".  The great thing from my point of view is that, once I get it working, it will make an enormous difference to my lifestyle. Instead of getting up in the middle of the night (here in Australia), I’ll let the program do the job for me!

Of course, testing is critical. I suspect it will be quite a while before I have sufficient confidence to leave it running on its own. Initially I’ll let it trade for a month or so while I’m watching it – just to make sure it is performing correctly.  Getting the main logic working is the initial focus, but it is also important that it handle error conditions. For example, it would be a potential disaster if the connection to TWS went down at a critical moment, while I was sleeping blissfully unaware of the situation. (I’m planning on getting the computer to call my cell phone if that happens.)

Anyway, I’ve decided to try and trade again in the coming week, continuing the small capital project. It is a natural law that during the time I have been out of the market, there have been several really good trading opportunities. (Most commodities have been quite lively over the last couple of weeks, and the grains are no exception.) That always seems to happen… Let’s hope the good run continues!