I have been working quite some time on this problem. In an indicator, one uses a DataSeries to store and then display sequential data for each bar on a chart. For example:
myDataSeries.Set(Value); // store and display sequential data
Question: How does one process data in a DataSeries from any bar other than the current bar and store it sequentially ([0], [1], etc.) ?
Some simple examples I have tried to handle this problem includes:
As a DataSeries: newDataSeries.Set(myDataSeries[5]); // [5], [10], … stored sequentially as [0], [1], …
As an Array: newDataSeries(myDataSeries[5]) // same as DataSeries example
The resultant data can then be used in formulas as they are now in sequential order. Any ideas?
Thanks.
Tony
