Saturday, September 22, 2007

Keeping up


One of the things I do during the typical trading day is backtest various EOD trading ideas on TradeStation to refine my swing trading strategy and tactics. Some of the most profitable and robust systems are fairly rudimentary. Here are the results and code for a simple CCI support/resistance system for the Qs that's profitable over 80% on the long side and 70% on the short side over a 5 year test period. The code is in TS 2000i format, because that's the version I have. Those with 8.2-8.3 should be able to copy the code to create the signals and then dump into the strategy builder. The system works best with select indexes and I leave it to the ambitious daytraders to optimize the inputs and backtest on 5, 15, 30 and 60 minute bars and apply stops appropriate to their risk tolerance.
Note: "Pyramiding" is turned ON in Strategy Builder.

Inputs: CCILen(6), OverSold(-130), OverBought(148),
OverSold2(-130), OverBought2(150);

If Currentbar > 1 AND CCI(CCILen) > Overbought
Then Sell Next Bar at Market;

If CCI(CCILen) < OverSold2 Then ExitShort at Market;

If Currentbar > 1 and CCI(CCILen) < OverSold
Then Buy Next Bar at Market;

If CCI(CCILen) > OverBought2 Then Exitlong at Market;

No comments: