The script you referenced is different from other pivot repainters.
With other pivot scripts, it is expected for pivots to repaint when the pivot point is broken through, allowing new support / resistance points to be created.
But with the script you referenced, uses future bars.
Meaning, it waits until the future to confirm the pivot happened and then goes back in time and repaints the pivot at the point it happened.
In answer to your question: yes, it repaints and it lags.
Which means the scanner filter in the above post had to be modified.
The scanner is set to look for pivots on the current candle, but in actuality they can be repainted much further back.
So the scan filter needs to be re-written:
this will only find pivots repainted within the last 10 bars.
I've been looking @ MACD signals and wondered if we can add orders in order to generate a P & L and a label
TY in advance
input pricecolor = yes;
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
def Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength);
def Avg = MovingAverage(averageType, Value, MACDLength);
plot Diff = Value - Avg;
Diff.Hide();
Diff.SetDefaultColor(GetColor(5));
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Diff.SetLineWeight(3);
Diff.DefineColor("Positive and Up", Color.GREEN);
Diff.DefineColor("Positive and Down", Color.DARK_GREEN);
Diff.DefineColor("Negative and Down", Color.RED);
Diff.DefineColor("Negative and Up", Color.DARK_RED);
Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.Color("Positive and Up") else Diff.Color("Positive and Down") else if Diff < Diff[1] then Diff.Color("Negative and Down") else Diff.Color("Negative and Up"));
AssignPriceColor(if !pricecolor then Color.CURRENT else Diff.TakeValueColor());
plot UpSignal = if Diff crosses above 0 then low else Double.NaN;
AddChartBubble(UpSignal, low, "Buy", Color.LIGHT_GREEN, no);
plot DownSignal = if Diff crosses below 0 then high else Double.NaN;
AddChartBubble(DownSignal, high, "Sell", Color.LIGHT_RED, yes);
#