With a lot of help from Claude and Gemini, I *believe* I have converted it, but would need some testing. On the subject of repainting, Claude gave me this response:ionone wrote: Tue Apr 07, 2026 11:40 pm Can someone who knows Pinescript or who can pass the indicator through some kind of "replay" mode tell me if this indicator repaints or is causal or not ? before I spend 20 hours converting it
https://www.tradingview.com/script/9Sgt ... end-Aslan/
thanks
Jef
Repainting Analysis
Good news: this indicator does not repaint signals in the traditional sense, but there are important nuances to understand.
Why it doesn't classically repaint: Signals are generated using barstate.isconfirmed checks and confirmed bar logic. The getSupertrend_var function uses close[1], upper[1], and lower[1] — only referencing previous confirmed bar data for the trend flip logic. The topFlag/botFlag pivot detection similarly uses [1] lookbacks. So once a signal fires on a confirmed bar, it won't vanish retroactively.
However, there are two legitimate caveats:
Adaptive parameter drift causes visual history changes. The adaptive engine continuously adjusts adaptive_multiplier, adaptive_atr_period, etc. The signal engine always uses these adapted values, so on a live chart the bands themselves will look slightly different tomorrow than they do today on historical bars — because the parameters have changed. The lockATRBands setting mitigates the visual band shifting but not the signal engine's internal parameters.
The indicator explicitly acknowledges this via the "Lock Envelope to Base" toggle — which confirms that without it, the plotted bands will "look jumpy" as parameters drift. This is a form of soft repainting on the visual layer.
Bottom line: Signal arrows won't disappear or move once confirmed, but the adaptive parameter system means the indicator's "view of the past" changes over time as it learns. For backtesting purposes, treat historical results with caution.