else if (State == State.Configure)
{
AddDataSeries("QQQ", Data.BarsPeriodType.Day, 500);
}
Since I have been getting errors I decided to just print out both closing prices like this:
protected override void OnBarUpdate()
{
if (CurrentBar < 252)
return;
Print("QQQ: " + Closes[1][0] + " " + "AAPL: " + Closes[0][0]);
}
I get the following error:
Indicator 'x': Error on calling 'OnBarUpdate' method on bar 252: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
I have plenty of data for the etf AND the current instrument. Both dataseries are set to 500 bars.
Dana
Comment