Money & Markets

TradingView Maps Three Forms of Script Repainting on SPY

A TradingView video uses 30-minute State Street SPDR S&P 500 ETF charts to distinguish three kinds of script repainting and sets out a five-step routine for live checks.

By Grace Kim

4 min read

Repainting: three kinds, shown on real prices
Repainting: three kinds, shown on real pricesPIX1861 / pixabay

What's News

  • The video identifies three recurring types of script repainting.
  • The charts use SPY 30-minute prices from the State Street SPDR S&P 500 ETF.
  • The closing routine has five steps, starting with “Once Per Bar Close” alerts.
  • The first two types are normal once understood; the third uses signals that never existed in real time.

By Grace Kim

TradingView author preuss_steffen demonstrates three types of script repainting on 30-minute State Street SPDR S&P 500 ETF prices, then ends the video with five checks traders can run against live charts.

His charts use AMEX:SPY, the ticker for the State Street SPDR S&P 500 ETF. TradingView defines repainting as “a script repaints when it behaves differently on past candles than in real time.”

The source puts the live candle at the center of the test: a signal that changes after the bar closes may present a cleaner history than traders actually saw.

preuss_steffen separates confirmation from hindsight. He treats the first two of his three categories as normal once traders understand them. The third, he says, makes a script look perfect in hindsight even though its signals never existed in real time.

The source uses its own SPY 30-minute charts to show those differences on real prices. Its practical question is whether a script’s live output matches the history it later displays.

What counts as repainting?

TradingView’s definition links repainting to a mismatch between past and real-time behavior. preuss_steffen organizes the demonstration around the same mismatch. His first step is to fix an alert at the bar close, and his second is to judge a signal only after the candle has closed. Those steps set the point at which the script’s output should stop changing.

The source does not treat every later adjustment as the same problem. Two categories involve signals on a running candle or drawings added into the past. preuss_steffen says traders can handle both once they know how they work. The third category uses future information and breaks the live-versus-historical comparison.

That’s preuss_steffen’s test in plain terms: the live chart and the later chart must match.

Which three patterns does the video show?

1. Signals on the running candle. This first pattern occurs before the bar has closed. preuss_steffen counts it among the three recurring cases and treats it as normal once known. His close-based review rule addresses it directly: traders should assess the signal only after the candle closes.

2. Signals drawn into the past. The second pattern places a signal on earlier candles after the fact. A pivot that is confirmed only later is preuss_steffen’s example.

The chart can then show a pivot on a candle before its later confirmation. The source still places this pattern in the group that becomes manageable once traders understand it.

3. Scripts that look into the future. The third pattern is the one preuss_steffen separates sharply. Such a script looks perfect in hindsight, although its signals never existed in real time. That differs from waiting for a candle to close or for a pivot to receive later confirmation: the source treats those first two cases as manageable, while the future-looking version never produced its apparent signals live.

In preuss_steffen’s account, the first two are normal once understood; the third creates a perfect history without live signals.

How does the five-step routine work?

The video ends with five checks that move from alert settings to code and the script author. Each step tests a different link in the chain between a live signal and the history on the chart.

  1. Set alerts to “Once Per Bar Close.” preuss_steffen makes that exact setting the first step. It fixes alert delivery to the close of the bar rather than to a still-running candle.

  2. Judge signals only after the candle closes. The second step puts the close at the point of assessment. It directly addresses the running-candle pattern by removing the unfinished bar from the review.

  3. Compare a screenshot now with one a few candles later. The third step checks whether the chart still looks the same. preuss_steffen specifies a few candles, not a fixed number, and uses the comparison to reveal changes that appear after the first view.

  • Search open code for lookahead_on. The fourth step moves from visual inspection to the source. preuss_steffen’s instruction calls for a lookahead_on search without a further parameter, but the published text leaves that value blank.

  • Ask the author how the script behaves in real time. The fifth step puts the live-behavior question to the person behind the script. preuss_steffen includes it alongside code inspection because his demo concerns the gap between a chart’s live output and the history it later shows.

  • In preuss_steffen’s sequence, the trader fixes the alert, waits for the close, compares, inspects and asks.

    What should traders take from the demo?

    Three points remain. Timing comes first: preuss_steffen bases the test on the close rather than on a running candle. Visual comparison comes second. Code inspection and a direct question to the author complete the check on the future-looking category.

    The source supplies no performance result, return figure or claimed trading advantage for the SPY examples. Its focus stays on script behavior and the evidence needed to judge it. For preuss_steffen, a trustworthy signal must survive the close, a later screenshot comparison, an open-code check and the author’s account of live behavior.

    The next step for traders is concrete: judge a script only when its live output and later chart agree, and ask its author to explain any difference.

    Source: tradingview.com

    Share this article:

    More from Grace Kim

    Grace Kim

    Show full bio

    Market editor covering people, launches and day-to-day practice in entrepreneurship, startups and venture funding at Business Bearings.

    1,719 articles

    Related articles

    « Previous articleNext article »