Some architecture notes-- What I've done is create an API on top of the TWS API for the construction of trading programs. There is an "adapter" interface which plugs into the broker of choice (IB). In theory, to use the API with another broker I'd just have to write another adapter. The real benefit is that I can write trading programs the way I think, rather than the way the TWS-API (or whatever) is set up. The first attempt ended up being mostly a throw-away. From what I understand after reading about professional development, that's not uncommon. That took about a year and a half. It took a long time because I had to learn about modern programming, but mostly because automated trading is one of the more difficult applications to really understand. Order management was very difficult. I spent many hours concentrating quietly with pen and notepad. The second attempt turned out rather well. That's what I'm using now. I started it at the beginning of April, so it took about four months. The program I am trading with now, built on the API, is called "SQTP" for "single-quote trading program". I should be able to run multiple instances on multiple securities (haven't tried yet), each taking only 16MB of memory on the remote Linode. I'm already thinking about a non-directional, multi-security program. It would be something to run when I expect a volatile day with no reference points to start out with. These are days when the market is "out of balance" as the premarket prices are already above/below significant reference points. Question 1: Is it too late at that point (pre-market) to make money from an increase in volatility, should it turn out to be a volatile day? Question 2: What options can give good results from an intra-day straddle if the market moves +/- 1-2 ADR? Question 3: Ditto for #2, but with spreads (options or futures).
Mon: 1 trade, +4.75 Today: more buy programs (b/o of the premarket high plus buying @ couple of potential support levels)
like gmst, I still don't understand why you just didn't code your strategies in NT or MultiCharts I can see if you were engaged in hft but a tick is a tick and commercial applications like NT/MultiCharts are more than adequate for your strategies. It doesn't seem like your strategies are doing anything out of the ordinary that would require granular control over each tick. On the contrary, it seems like you're just reinventing the wheel.
Today I anticipate the availability of good day trades on both sides, so I've got breakout entries set up around yesterday's high and the 2697 area. I'll also be looking to sell resistance around premarket highs, and buy support around 2700. It'll be interesting to see how it works out!
I think it's a good discussion to have (not focusing on me, but in general): when should an automated trader write some/all of his own stuff, vs. subscribing to a commercial package? And I think that's what someone starting out in automated trading needs to think about first. In my case, I'm very happy to control everything in between the incoming ticks and the outgoing orders, harness the power of Linux, run on an inexpensive remote Linux box, and add/modify features at will. Many of the most important features have to do with setting up trades and analyzing results. A commercial author, or even open-source author, has far different objectives than optimizing things for me.
Running almost the same program as yesterday. Yesterday's results: 1 trade (the aforementioned short), 0 pts. The stop moved up almost immediately and was taken out. I need to investigate whether that was a consequence of the incoming ticks and input parameters (supposed to happen) or a malfunction (not supposed to happen).
have been following this thread with interest. could you please clarify for the non-techy (can't sift through your code) what the triggers / parameters are for your trading ... in terms of concepts... no need to be specific if you dont want to] I also like your approach- totally deconstructing a clear non-random event into a tradeable strategy rgds Seb
Hi Seb, it's a collection of very simple price action and time constraints. Many I learned from years of screen watching and discretionary trading. Others come from remarks my elementary-school aged kid made after looking at a chart. What I didn't realize is once they're all rolled together, they make quite a formidable trading machine. Here's one example. At one time I was trading breakouts on the YM (mini-DOW futures). It was profitable, but I noticed a certain recurring event that would always result in the maximum loss for the trade. This was the old "false breakout" when I'd get just one or two ticks triggering my stop entry, followed by a fast, aggressive move in the opposite direction, right into my stop exit. Maximum loss with no time to react. Why not go with a market entry once a breakout is confirmed? Well, for me personally (too emotional), I'd lose less money by lighting a wad of cash on fire each day and walking away. So.. here's how the breakout entry code works. First, there's the breakout price. Once we hit the breakout price, the clock starts. We look to see if price retraces a certain amount to the "cancel" price. Once the clock finishes, if we didn't hit the "cancel" price, we put in a limit order entry. The limit order price is independent of the other two prices (breakout and cancel). The total clock time is another parameter. By playing with the parameters, I've been able to shape all kinds of different breakout entries/behaviors. I do an enjoyable exercise where I look at the chart from the day's trading and see how parameter tweaks may have changed the results for the better. I look at the price action and see if there's anything out there to capture. I guess we'll know a few months from now if it all works.