My question: How do I access the High and Low of a non-primary BarsArray?
protected override void Initialize()
{
Add(new Plot(Color.Gray, PlotStyle.Square, "Upper0"));
Add(new Plot(Color.Gray, PlotStyle.Square, "Lower0"));
Add(PeriodType.Minute, 15); //
}
protected override void OnBarUpdate()
{
Upper0.Set(Instrument.MasterInstrument.Round2TickS ize(Highs[1])[0]);
Lower0.Set(Instrument.MasterInstrument.Round2TickS ize(Lows[1])[0]);
}
The lines in red don't work no matter whether I use High or Highs.
I also tried
Upper0.Set(Instrument.MasterInstrument.Round2TickS ize(SMA(High,1) [1] [0]);
Lower0.Set(Instrument.MasterInstrument.Round2TickS ize(SMA(Low,1) [1] [0]);
I would appreciate some help.
sandman
Comment