Suppose I run a backtest in the Strategy Analyzer, with a starting time of 1 January 2012, and an ending time of 1 February 2012. I enter these dates into the Strategy Analyzer window.
On the first bar of the backtest (first bar of 1 January 2012), I want to look back at prices from the year 2011. I do it this way:
DateTime CurrentTime = Time[0]; DateTime TargetTime = CurrentTime.Subtract(new TimeSpan (LookbackDays,LookbackHours,0,0)); TargBar = Bars.GetBar(TargetTime); LookbackBars = CurrentBar - TargBar;
The problem is that NT yields LookbackBars = CurrentBar until the backtest has ran for a longer than my lookback window: NT is not loading more bars than it think it needs to.
How can I load more bars, and yet start the backtest on 1 January 2012?
Will MaximumBarsLookBack = Infinity work? Can I Add() more bars?
Thanks!

Comment