Example, if I want to backtest yesterday's high in AAPL, i simply code:
protectedoverridevoid Initialize()
{
Add(PeriodType.Minute, 1); // Index 1
Add(PeriodType.Day, 1); // Index 2
CalculateOnBarClose = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
if (BarsInProgress == 2) // Do something with day bars
{
Print(Highs [2][0]);
}
}
using AAPL as my instrument from the backltest menu;
When this works I get 5 days of data to print to the output window instead of instead of simply yesterday's close which was 325.80...what am I doing wrong?
Thanks in advance.

Comment