Tradestation is a pretty amazing testing and development platform. I’ve been using it for over 10 years, and I’ve been very happy overall with it. Sure, there are certain aspects of it I don’t like, and certain things that are hard to do, but I think that is true of almost any platform.
My biggest pet peeve with Tradestation is that it is hard to trade 2 automated strategies in the same market at the same time. Why is this even important? Why not just trade the best strategy, and shelve the one that does not perform as well? Many people do just that; unfortunately they usually pick the wrong strategy to trade!
I take the opposite approach in my trading – I assume that I don’t know what strategy will perform best in the next 6 months, or at any point in the future. Plus, I also assume that all strategies will eventually break, and have to be retired. So, I want plenty of strategies for each market, and I want to trade them all. This leads to diversification, which has been known for years to smooth out the overall equity curve.
With that in mind, consider the equity curves and code for two very simple strategies. Shown in Figure 1 is a momentum strategy, and Figure 2 depicts a simple moving average system. Both are applied to daily Crude Oil bars for the past few years, and do not include slippage or commissions. If you traded both at the same time, you’d want the equity curve to look like Figure 3, which is just the daily sum of the two strategies.
So, how could you do this – trade 2 strategies in the same market at the same time- in Tradestation? There are quite a few options to do this. Unfortunately, all have advantages and, most importantly, disadvantages.
Option 1 would be to insert the two strategies on the same chart. That leads to decent results in this particular case, as shown in Figure 4. But, it does not equal the equity curve we want (although in this case it is fairly similar), shown earlier in Figure 3. In general, this is not a good alternative. Too many times, inserting two strategies on the same chart will lead to terrible results.
Option 2 would be to combine the code for each strategy into one “super code” and trade that. The code for each would be cut and pasted into the “master” code, with no changes at all. With this technique, however, the resulting strategy still does not mimic the curve we want. This is especially true if the strategy uses Tradestation reserved words, such as openpositionprofit and market position. This method is just another disappointment.
Option 3 is to trade each strategy, in a separate chart, in the same account. Depending on the code, though, this option can be fraught with disaster. For example, you cannot use the Trade Manager Position Match feature any longer, so you’ll never know if your real life positions match both strategies. And that is just the tip of the iceberg. Stop losses, market position based rules and many other nuances in Tradestation make this a very difficult alternative. The end result with this option, based on my personal trading experience, is that it just is not a feasible option.
Option 4 is to trade each strategy in its own chart window, and use a third party tool to manage or enter the positions. This is a good solution, but there is a fee for this 3rd party software. Some possible software packages that may help you with this option:
Of the three, I have only used the Ninjatrader option to send orders from Tradestation thru Ninja to another broker. But, I did not use this interface specifically to trade multiple strategies with one instrument. One of these solutions may work for your particular case.
Option 5 is to trade each strategy in its own chart, in its own account. So, if I had 3 ES strategies, I would trade each strategy in a separate account, meaning I’d need 3 accounts. This is the method I have primarily used. It has its advantages – it makes bookkeeping each strategy a bit easier, and the strategies can be tracked fairly easily in Tradestation’s Trade Manager.
But, the approach also has its downside. For instance, it is a very non-optimal way to use margin. If I go long in one account 1 contract of ES, that ties up $5060 in margin. And if I go short 1 ES in another account, it would tie up another $5060. So, I end up with 2 positions, in opposite directions, meaning in reality I am net flat, and instead of needing $10,120 in margin, I should need $0!
Although there may be other potential solutions to the problem, I am going to with Option 6. This solution involves summing up position in multiple strategies, and then just trading to reach the net position. For example, if strategy #1 was long, that would be +1. If strategy #2 was also long, that would be +1 also. Summed up, that would mean you should be +2, or long 2 contracts.
The nice thing about this solution is that you could potentially trade many strategies at the same time, and have the result traded through and depicted on only one chart. So, each individual strategy could be evaluated separately (using the Strategy Factory process, I teach for example), and then it could be “added” to other profitable strategies.
“Decoded: trading multiple strategies the right way for system traders”
In theory, that seems like an easy proposition. Just sum up positions, and trade the net. But, reality is quite a bit tougher, due to the way Tradestation works, and also just due to the nature of the problem.
In the next installment of this series, we will take the first step towards creating a “super” strategy that trades 2 strategies – creating strategies that perform similarly to the original strategies of Figure 1 and 2, but that will lend themselves to being combined into the super, master strategy.
If you would like to learn more about building trading systems be sure to get a copy of my latest book, Building Winning Algorithmic Trading Systems.