what are the possible reasons for CurrentBars[1] of the secondary (added) data series to be: -1 all the time?
It seems that he following addDataSeries failed to load any data?
else if (State == State.Configure)
{
ClearOutputWindow();
// add minute data series to watch for EOD
AddDataSeries("ES", BarsPeriodType.Minute, 15);
...
Print("State: Configured done");
}
else if (State == State.DataLoaded)
{
...
Print(Times[0][0].ToShortTimeString() + " DEBUG => current bars[1]:" + CurrentBars[1].ToString());
}
Note: access to this time-frame data from my provider was tested by loading it into a chart, as a primary data series
Here is a debug-output from the script (primary data BarPeriod = 60min)
State: Configured
7:00 PM DEBUG => current bars[1]:-1
State: Data Loaded
OnBarUpdate():
7:00 PM DEBUG 0 => current bars[0]:0
7:00 PM DEBUG 1 => current bars[1]:-1
OnBarUpdate():
8:00 PM DEBUG 0 => current bars[0]:1
8:00 PM DEBUG 1 => current bars[1]:-1
OnBarUpdate():
9:00 PM DEBUG 0 => current bars[0]:2
9:00 PM DEBUG 1 => current bars[1]:-1
OnBarUpdate():
10:00 PM DEBUG 0 => current bars[0]:3
10:00 PM DEBUG 1 => current bars[1]:-1
OnBarUpdate():
11:00 PM DEBUG 0 => current bars[0]:4
11:00 PM DEBUG 1 => current bars[1]:-1
Sate: defaults set
Sate: defaults set
Sate: defaults set
Comment