What Does 'Repainting' Mean in TradingView?
Repainting refers to an indicator that changes the values it previously plotted on historical bars once new price data arrives. In plain terms: the signal you see on a closed bar today may not have been there when that bar was forming — the indicator painted it retroactively.
This is one of the most widespread and damaging problems in retail trading software. A strategy tested visually on historical charts looks profitable because the indicator 'knew' where price was going — but that information was not available in real time. When the same system is traded live, performance collapses.
A 2024 survey of 1,200 retail traders found that over 60% had unknowingly backtested with a repainting indicator at some point. The financial and psychological damage is significant.
A repainting indicator is not a flaw you can work around. It invalidates your entire backtest. If your signals change after a bar closes, the strategy you tested does not exist.
The Three Types of Repainting
Not all repainting is equal. Understanding the three categories helps you make informed decisions about which indicators to trust.
- ✦Future-bar repainting: The indicator uses data from future bars (e.g. security() calls with lookahead=true) to plot values on past bars. This is the most severe form and produces completely fabricated backtest results.
- ✦Intra-bar repainting: The indicator shows a signal on the current, still-forming bar. The signal disappears or changes once the bar closes. Scalpers sometimes accept this if they know about it, but most traders don't.
- ✦Parameter-shift repainting: Changing an indicator's settings retroactively changes all past signals. This allows curve-fitting: the user picks settings that made the indicator look good on history, then trades them forward without statistical validity.
How to Test Whether an Indicator Repaints
The most reliable method is manual bar-replay. Enable bar replay in TradingView (available on Pro plans and above), step through a 3–6 month period bar by bar, and record every signal the indicator fires. Then compare those recorded signals to what the indicator shows on the same period in normal chart view.
A simpler but less thorough method: add the indicator to a chart, note all visible signals, then reload the page and compare. Some indicators will have already adjusted.
In Pine Script code, look for: use of `request.security()` with `lookahead = barmerge.lookahead_on`, use of `calc_on_every_tick = true` in strategy settings, or signals that reference `close` without being wrapped in `barstate.isconfirmed`.
The gold standard test: add the indicator to a live chart, screenshot every signal for 2 weeks, then compare to what the indicator shows 2 weeks later. If signals have moved, it repaints.
barstate.isconfirmed: The Key to Non-Repainting Signals
In Pine Script v5 and v6, `barstate.isconfirmed` returns true only when a bar has fully closed and its OHLCV data is final. Wrapping signal logic in this condition is the primary technique for ensuring non-repainting behaviour.
When a signal is gated by `barstate.isconfirmed`, it will only fire at bar close, using only data that was available at that moment. The signal is then permanently locked to that bar and cannot change regardless of what price does afterwards.
This is the exact approach used in the Quantum DeCasteljau v10.7 PRO ML indicator: every buy, sell, and exit signal is confirmed only when the bar closes, making the signal permanent and backtestable without look-ahead bias.
Why Non-Repainting Indicators Produce Fewer Signals
If you have used both repainting and non-repainting versions of similar indicators, you will notice that the non-repainting version fires significantly fewer signals. This is not a weakness — it is a feature.
Repainting indicators appear to catch every turn and every move because they retroactively place signals at the optimal entry point. A non-repainting indicator can only act on confirmed data, which means it will sometimes 'miss' the very beginning of a move. The entry is slightly later, but it is real.
A system with 60% win rate on confirmed, non-repainting signals is worth far more than one showing 80% on a chart — but performing at 40% live. Professional traders universally prefer the former.
Checklist: Is Your Indicator Non-Repainting?
Use the following checklist when evaluating any TradingView indicator:
- ✦Does the developer explicitly state it is non-repainting?
- ✦Does the Pine Script code use barstate.isconfirmed for signal generation?
- ✦Does the code avoid request.security() with lookahead_on?
- ✦Can you verify signals with bar replay that match the chart?
- ✦Does the strategy report use calc_on_order_fills=false and calc_on_every_tick=false?
- ✦Are past signals stable after a page reload or timeframe change?
Quantum DeCasteljau v10.7 PRO ML passes all six checks. Signals are confirmed at bar close and are permanently locked — they cannot change after the fact.