PDA

View Full Version : Min Bars required under strategy backtesting


Sidhartha
04-07-2008, 05:09 PM
Hi All,

Is there an easy way of setting the 'Min Bars' required for a strategy to start calculations, but enforce this on a 'per session' basis...??

Right now my strategy is taking bars from the end of the previous session and throwing them into calculations with data from the start of the next session.

Effectively I want isolate calculations within a session, but for the purposes of backtesting I want to calculate across several months of data...

Many Thanks

NinjaTrader_Ray
04-07-2008, 07:48 PM
Min bars will not make a difference in the context that you have described. Min bars is only affective on first X bars that you specified.

Sidhartha
04-08-2008, 02:03 AM
Hi Ray,

Yeah I kinda guessed that was the case.

Ok, is there an easy way to force NinjaTrader not to include bars from the previous session in calculations...? For many day trading strategies you only want calculations to include bars from the current session. But of course you'd like to backtest over many days worth of data and trades.

Any ideas...? I will be able to hack it, I'm just wondering if there is an obviously easy way to achieve this...?

Many Thanks

Sidhartha
04-08-2008, 04:07 AM
A paramter that returns the 'currentbar' of the current session rather than the whole date series would be useful here.... Just a thought.

Anyone from NT with any thoughts on this query...?

Thanks

NinjaTrader_Ray
04-08-2008, 07:17 AM
You would have to add logic in your calculations to filter out bars you do not want included.