PDA

View Full Version : question on backtesting a strategy


z32000
11-20-2007, 07:24 PM
I was wondering if say...

I have intraday data for ES on two days... 11/1/07 and 11/2/07

and I run a backtest that at 1:03am, type a message in the output box ("hello ")...

if there is volume on every minute on these two days except on 11/2/07 there is "zero" volume at 1:03am...

in the output box....should it display the below?

hello hello

or just

hello


I'm trying to figure out if it will execute a function at a time when there is no volume...
thanks in advance

NinjaTrader_Dierk
11-20-2007, 10:21 PM
Not sure I follow. If an any particular minute there is not volume, then there will be no 1 minute bar for this minute meaning OnBarUpdate would not be triggered.

z32000
11-20-2007, 10:48 PM
Interesting...

in real trading, if I wanted to put in a long position at about 1:03am but there is no volume at that time..naturally, the market would force the order within a minute or so depending if there is someone willing to sell...but sooner or later, the order should go through

to simulate this in Ninjatrader, are you saying that instead of using the == sign, do i use the >= instead? As in the code below?

am I suppose to write the code
if (TimeTo[0] >= 10300)
EnterLong();


I would think that >= means putting in a long position "every" minute "on or after" 1:03am which would certainly give the program a tumor...


Not sure I follow. If an any particular minute there is not volume, then there will be no 1 minute bar for this minute meaning OnBarUpdate would not be triggered.

NinjaTrader_Dierk
11-20-2007, 11:00 PM
>> do i use the >= instead?
Right that would be an option.

z32000
11-21-2007, 06:08 AM
but logically, shouldn't >= cause the function to go long "every" minute after 1:03am which should cause the program to go crazy?
>> do i use the >= instead?
Right that would be an option.

NinjaTrader_Dierk
11-21-2007, 06:15 AM
Please make sure you understand the concept of entry signals in NT: http://www.ninjatrader-support.com/HelpGuideV6/Overview36.html