Repainting is the reason a screenshot of a chart proves nothing.
An indicator repaints when the signals you see on historical bars are not the signals that were available at the time those bars formed. The arrows sit exactly where you'd have wanted to buy — because they were placed after the outcome was known. Scroll back and it looks flawless. Trade it forward and it behaves like a different tool entirely.
This is not always dishonesty. Most repainting is a side effect of how Pine Script evaluates data, and plenty of authors ship it without realising. That's precisely why you should test rather than trust.
The three things people call "repainting"
They have different causes and different consequences, and lumping them together is how traders end up arguing past each other.
1. Intrabar recalculation
A script evaluates on every price tick of the unclosed candle. A condition becomes true mid-candle, an arrow appears, price moves against it before the close, the condition becomes false, and the arrow vanishes.
This is the honest version of repainting: nothing is being hidden, the signal was genuinely true for a moment. It becomes a problem when you take the entry and the signal then disappears — you are holding a position the indicator no longer believes in.
Fix: act only on closed candles. Alerts should be configured as Once Per Bar Close, and a well-built script will also gate its own confirmed signals on the bar close rather than the live tick.
2. Backward-shifted plots
Some indicators intentionally draw a marker back in time — pivot points, swing highs and lows, ZigZag lines, many "smart money" structure tools. A swing high cannot be confirmed until a set number of bars have traded to the right of it, so the label appears late but is drawn at the earlier bar.
The plot is honest about the level. It is dishonest about when you knew. If a tool claims to have called a top, check how many bars of hindsight the confirmation required.
Fix: none needed — but read the offset. If the swing needs five bars to confirm, you were never able to act five bars earlier, and any evaluation of the tool has to account for that.
3. Higher-timeframe leakage
A script pulls data from a higher timeframe without requesting the completed value. On historical bars it receives the finished higher-timeframe candle; in real time it receives a partially formed one. History looks clean and precise, live behaviour flickers.
Fix: the script must request higher-timeframe series with confirmed-bar settings. As a user, you can't see the code on an invite-only script, so you test the behaviour instead.
