Free: indicator teardowns, a repaint checker and open-source scripts. No buy/sell signals, ever.

Taught to TradeSystems over signals.

Explainers / What is repainting on TradingView?

Pine Script repainting: what it is on TradingView

An indicator repaints when what it shows for a past bar today is different from what it showed on that bar when it was live. A signal you see on the chart now may not have been there at the time, or may have been somewhere else.

That matters for one reason: you can only act on what an indicator showed at the time. A chart that repaints looks better in hindsight than it ever was in real time.

Not all repainting is the same. There are four kinds, and they differ a lot in how much they matter.

1. The live bar moves (almost every indicator)

Until a bar closes, its close is just the latest price. Anything calculated from the close moves with every tick: RSI, moving averages, VWAP, Supertrend, and so on. A cross or a colour change can appear mid-bar and be gone at the close.

This is normal and easy to handle: read signals on closed bars, and set alerts to "Once per bar close". Once the bar closes, the value is fixed.

2. Future bars are used to draw the past (the misleading kind)

Some scripts calculate each historical point using bars that came after it. The past looks smooth and well-timed because it was drawn with knowledge of what happened next. The newest part of the line keeps changing as new bars arrive.

Common examples:

3. Higher-timeframe data leaking onto history

A script that pulls daily data onto a 1-hour chart can, on historical bars, see the day's final close at the start of the day. In Pine Script this happens with request.security() when lookahead is on and the value is not offset by one bar. On history it looks like perfect timing. Live, the day's close is not known until the day ends.

The standard fix is to request the previous completed higher-timeframe bar:

request.security(symbol, "D", close[1], lookahead = barmerge.lookahead_on)

If a script requests another timeframe, check how it does it before trusting its history.

4. Strategies that fill differently in history and live

A strategy calculated on history sees each bar only once, at its close. Live, with "recalculate on every tick" turned on, it can act mid-bar. The backtest and the live behaviour then follow different rules. Intrabar order fills on history are also estimated from open, high, low and close, not from the real path of price.

"Repainting Mode Enabled": what that box means

If you see a box saying "Repainting Mode Enabled" on your chart, it is most likely LuxAlgo's Nadaraya-Watson Envelope, which prints that message in its default mode. As far as we can find, it is not a TradingView setting. To turn it off, open the indicator's settings and untick "Repainting Smoothing". The line then becomes a one-sided average that does not change its past, at the cost of lag (about 6 bars on average at the default settings). Full explanation: Nadaraya-Watson Envelope.

Which popular indicators repaint?

Read from each script's published source:

IndicatorClosed barsLive barNotes
VWAPFixedMovesAnchored VWAP anchors are chosen in hindsight
SupertrendFixedMoves (flips can vanish)Higher-timeframe versions depend on how they request data
RSIFixedMovesSame caveat for higher-timeframe RSI
UT Bot AlertsFixedMoves (labels can vanish)Heikin Ashi request uses the chart's own timeframe
Squeeze Momentum (LazyBear)FixedMovesNo future data; no built-in alerts
Nadaraya-Watson Envelope (LuxAlgo)Redrawn in default modeMovesUses later bars; endpoint mode does not

Each line has its own page: VWAP · Supertrend · RSI · UT Bot Alerts · Squeeze Momentum · Nadaraya-Watson Envelope.

How to check any indicator yourself

  1. Bar Replay. Step forward bar by bar and note where signals appear. Then jump to the present and compare. A signal that is on the chart now but did not appear during replay was repainted.
  2. Watch it live, then reload. Screenshot a few signals as they happen. Reload the chart the next day and compare.
  3. Read the source, if it is open-source. Look for request.security() calls, negative offsets or offset = on plots, pivot functions, and drawings that are deleted and redrawn on the last bar. Or paste the code into our free repaint checker: it lists the lines matching known repaint patterns, with the usual fix, and runs in your browser without uploading anything. It flags risk; it cannot prove a script is safe.
  4. Check the alerts. If an alert uses a value that is only final on bar close, set it to "Once per bar close".

Where it fails

Educational content only. Not financial advice. Nothing here is a recommendation to buy or sell anything.

Also explained: Repaint checker, VWAP, Supertrend, RSI, UT Bot Alerts, Nadaraya-Watson Envelope, Squeeze Momentum, Is TradingView backtesting accurate?, Chandelier Exit, WaveTrend Oscillator, QQE MOD, Pivot highs and lows, Hull Suite, Range Filter, Twin Range Filter, HalfTrend, ZigZag++, SSL Hybrid, CM MacD Ultimate MTF, Volume Profile / Fixed Range, ADX and DI, Support Resistance Channels, Market Structure Break & Order Block, Order Block Finder, Pivot Point SuperTrend, Trendlines with Breaks [LuxAlgo], Divergence for Many Indicators, TradingView script selling terms, Support and Resistance Levels with Break, Liquidity Swings [LuxAlgo], Pine Script errors, Breakout Probability (Expo), Did ChatGPT or Claude write your Pine Sc, Lorentzian Classification, SuperTrend AI (Clustering), Machine Learning Adaptive SuperTrend, Dynamic Swing Anchored VWAP, Support and Resistance Power Channel by , Support and Resistance (High Volume Boxe, Trendline Breakouts With Targets by Char, Breakout Finder by LonesomeTheBlue

Next steps

  • Get a script fixed. Compiles but behaves differently live, or changes after a reload? In a Pine Script Audit, an AI model reads every line and writes a report on what to fix for $49, or also fixes those problems for $149. It cannot prove a script is safe. Order an audit
  • Check your own script. Paste its source into the free repaint checker. It runs in your browser and flags known patterns.
Subscribe to the Teardown Letter: $19/moBack to Taught to Trade

No TradingView account yet? This affiliate link gives you a $15 coupon toward a paid plan, and we earn a commission if you buy one. The free plan is enough to follow this page.