I want to code pivot breakout indicator, and store previous pivot values inside series. How can I store data in Series, that it would only update when certain price point is broken, like:
if (High[0] > PivotHigh[0])
{
PivotHigh[1] = PivotHigh[0]; // Optional, unless it automatically stores new value into the series, so this step may not be necessary.
PivotHigh[0] = High[0];
}
And until next time, when High[0] > PivotHigh[0], PivotHigh[0] would remain the same, no matter how many bars passed.

Comment