PDA

View Full Version : Help wit backtesting vs. live trading a strategy


4XFan
10-16-2009, 02:18 PM
Hello,
This is my first ever post so please bear with me if I screw it up...

I've created a strategy where the entry conditions are given by a combination of 180 minute and 60 minute bars. Basically, I check for entry conditions on the FistTickOfBar. For example, if I were trading live, at 11:00, on the 180 minute bar (timestamped 14:00) I would check the previous bar (from 8:00 to 11:00) and I would check the 10:00 (timestamped 11:00) 60 minute bar (from 10:00 to 11:00)

The problem I have is the following:

If my understanding is correct, when backtesting, bar sequence will be
11:00 180 minute bar
11:00 60 minute bar
12:00 60 minute bar
13:00 60 minute bar
14:00 180 minute bar
...

While on live trading, the sequence would be:
14:00 180 minute bar
11:00 60 minute bar
12:00 60 minute bar
13:00 60 minute bar
17:00 180 minute bar
...

#1 Is my understanding correct on how the bars are read?

If so, my question is:

#2 Does anyone know how to emulate the behavior of live trading during the backtest? I have not been able to perform adequate backtests because of this. Basically, I can "read" the correct 180 minute bar, but I'm reading the wrong 60 minute chart, actually, three hours wrong...

I would appreciate any and all help. Thanks!

NinjaTrader_Josh
10-16-2009, 02:35 PM
#1. Depends on the order you add the multi series in. You can see what I mean by redoing which series is primary and which is secondary and seeing how the prints happen.

#2. This may help: http://www.ninjatrader-support2.com/vb/showthread.php?t=6652

4XFan
10-16-2009, 08:32 PM
Thanks Josh,
I finally realized where my mistake was. It was conceptual more than with the actual use of the software. Your comments made me realize what I was doing wrong. I appreciate the help.