I have a single-TimeSeries indicator that I've applied to a chart with one data series (SPY), and I can access my indicator's Closes[0][5] with no problem.
However, when I manually add a second TimeSeries to the chart (GLD) by right clicking on the NinjaTrader Chart and choosing a second TimeSeries, this second time series is not also added to the indicator on the chart, so when I call Closes[1][5] from within my indicator, an exception is thrown because my indocator still only has 1 TimeSeries.
How can I access TimeSeries data for the second series added manually to the chart, for instance how can I get the value for the GLD Close 5 bars ago, like Closes[1][5]?
I noticed that the ChartControl property of my indicator has meta-data about both time series in its Bars and BarsArray properties, such as the COUNT of the GLD and SPY bars, but I can't find a collection of actual TimeSeries data, like Closes or Highs, in either the Indicator properties or the indicator's CharetControl properties.
Any ideas?
Thanks in advance!
EquityTrader
Comment