I have a secondary data series in my indicator and I want to create a Series<double> which stores information for this secondary series rather than the primary data series.
I am declaring the series as:
private Series<double> numberSeries;
I create the series in State.DataLoaded:
numberSeries = new Series<double>(this, Period <= 256 ? MaximumBarsLookBack.TwoHundredFiftySix : MaximumBarsLookBack.Infinite);
I then create the secondary data using AddDataSeries
So my question is how can I access the numberSeries so that [0] element is the value for the current secondary bar and [1] element is the previous element etc... for the secondary data series?
It's all working except that when I access element [1] of numberSeries it's accessing the data corresponding for the previous bar of the primary data series rather than the previous bar of the secondary series.
Regards,
iq
Comment