Based on this thread
I am trying to implement the .Reset() method but the code used in post #4 & post #5 doesn't seem to be working for my indicator.
When I use the .Reset() method on a prior bar, the entire indicator disappears. Without the call to .Reset(), the indicator plots as expected but without the functionality I am trying to achieve.
Ideally, the indicator would "forget" that it was plotting at the bar being reset and, instead, plot at the value of PlotLine[0] on the current bar (which in this case is High[0]).
// Initialize Add(new Plot(Color.Orange, PlotStyle.Line, "PlotLine")); // OnBarUpdate if (Close[0] > Close[1]) { if (High[0] >= High[2]) PlotLine.Set(High[0]); if (PlotLine.ContainsValue(2)) PlotLine.Reset(2); // skip over value of 2 bars ago }
Many thanks
Comment