What Is Repainting in TradingView and How Can You Detect Repainting Indicators?
One of the issues you may encounter when using indicators and trading strategies in TradingView is Repainting, which refers to the rewriting or modification of signals and drawings.
An indicator may display highly accurate and attractive signals on historical charts. However, when you monitor the same indicator in real time as the market moves, you may find that the signals did not actually exist in that form at the time or were later changed.
This can make an indicator’s performance appear much better than it actually is and can lead to misleading conclusions when making trading decisions.
In this tutorial, we will examine the concept of Repainting and explain why understanding it is important, even for users who simply rely on ready-made TradingView indicators.
What Is Repainting?
Simply put, when an indicator’s historical output is displayed based on information that was not yet available at that time, we are dealing with a form of Repainting.
For example, imagine that on a historical chart you see that an indicator generated a highly accurate buy signal at a particular point.
If you only look at the historical chart, you may assume that a trader could have received that signal at exactly that point.
However, the reality may be different.
The indicator may have needed information from subsequent candles to determine that signal. As a result, when we look at the historical chart, the complete and accurate signal is visible, even though the information required to generate it was not yet available in real time.
This difference between what we see now on the historical chart and what would actually have been visible in real time is one of the most important aspects of Repainting.
Why Can Repainting Be a Problem?
The main problem occurs when a trader evaluates an indicator’s performance simply by looking at historical data.
Imagine an indicator displaying very accurate entry and exit points on a historical chart:
- Entries are placed almost exactly at market bottoms.
- Exits are close to market tops.
- There appear to be very few losing signals.
- Market reversals are identified with remarkable accuracy.
At first glance, such an indicator may appear extremely powerful.
However, if these drawings were created using future information, the trader could not have had access to that information in real time.
Therefore, the performance we observe on a historical chart does not necessarily represent the indicator’s actual performance in a live market.
How Does Repainting Happen?
To better understand the issue, we need to consider how information is generated on a chart.
The market moves continuously, and each candle changes while it is forming.
Until a candle closes, its final values are not known, and its Open, High, Low, and Close values may change.
Therefore, an indicator that performs its calculations in real time may produce different outputs while the current candle is forming.
For example, at the beginning of a candle, certain conditions may be met and the indicator may display a signal on the chart.
A few moments later, however, the price may change and those conditions may no longer be valid.
As a result, the previous signal may disappear or move to another location.
This should also be distinguished from Repainting caused by the use of future information, because not every apparent change in an indicator occurs for the same reason.
The Difference Between Real-Time and Historical Data
One of the most important things to consider when evaluating an indicator is the difference between the following two situations:
Historical Data
In this situation, all past candles are available to the indicator, and calculations may be performed using information that was not available at the time the signal originally occurred.
Real-Time
In this situation, the indicator only has access to information that has actually been generated by the market up to that moment.
These two situations can produce completely different results.
Therefore, simply observing an indicator on a historical chart cannot prove that its signals would have been available in the same form in real time.
A Simple Example of Repainting
Imagine an indicator designed to identify market reversal points.
On a historical chart, you may see a buy signal at a market bottom, followed by a strong price increase.
However, to identify that bottom, the indicator may need to examine several subsequent candles.
In other words, the indicator may wait for the market’s future movement to become clear and then go back and plot the reversal point on the historical chart.
As a result, when we look at the historical chart, we see a very clean and accurate signal.
But a trader who was actually in the market at that moment would not yet have known that the point was truly a market bottom.
Therefore, a signal that we see today on a historical chart is not necessarily a signal that was actually available to the trader at that time.
Why Do Some Indicators Change Their Signals Later?
Sometimes you may notice that an indicator generates a signal at a certain point, but after several new candles form:
- The signal disappears.
- The signal moves to another candle.
- The position of a line or marker changes.
- Or previous drawings are modified.
This behavior may be caused by the use of new information in the indicator’s calculations.
As a result, what we see on the chart now may be different from what was visible in real time.
This is particularly important for indicators that identify swing highs and lows, trend changes, or entry and exit signals.
Does Every Change in an Indicator Mean Repainting?
No.
This is a very important point.
Not every change you observe while a candle is forming should immediately be considered Repainting.
Some indicators naturally use information from the currently forming candle.
Until the candle closes, its values can change, and as a result, the indicator’s output can also change.
Therefore, it is important to distinguish between natural changes in calculations on the current candle and changes to signals on previous candles.
The problem becomes more serious when an indicator changes its historical output after future information becomes available, causing its historical performance to look better than what could actually have been achieved in real time.
How Does Repainting Affect Trading?
If an indicator repaints, directly using its signals can produce misleading results.
For example, when reviewing historical data, you may believe that:
- There have been many successful trades.
- Entry points are extremely accurate.
- Stop losses are rarely triggered.
- Signals appear almost exactly at the best points in the market.
However, in real-time trading, many of these signals may not have existed in the same form.
Therefore, if you evaluate an indicator’s performance solely by looking at historical data, you may reach the wrong conclusion about its actual quality.
Repainting in Backtesting
This issue is also important when performing Backtesting.
If a strategy or indicator uses future information, the backtest results may be significantly better than its actual performance.
This is because, during a backtest, future data eventually becomes available to the system, allowing the indicator to perform calculations using information that would not yet have existed when the trade was actually being executed.
As a result, it is possible that:
Backtest Result ≠ Real-World Result
Therefore, before relying on the results of a strategy, you should verify that its calculations do not use future information.
How Can You Detect a Repainting Indicator?
One suitable approach is to evaluate the indicator under conditions where future information is not available.
Instead of simply looking at a historical chart, you can start from a specific point and observe what the indicator displays at that moment.
Then, as new candles form, monitor the indicator’s behavior.
If you find that the indicator changes historical information based on subsequent market movements, you should be more cautious about relying on its signals.
The Replay feature in TradingView can also be very useful for this type of analysis. It allows you to start the chart from a specific point in the past and follow the market as it develops, providing a way to examine the indicator’s behavior under conditions that are closer to real-time.
Why Should Regular TradingView Users Understand Repainting?
Understanding Repainting is not only important for Pine Script developers.
Even if you do not write any code and simply use ready-made TradingView indicators, it is still important to understand this concept.
A ready-made indicator may show very impressive performance on a historical chart, while that performance may be the result of using information that was not available to the trader in real time.
Therefore, before using any indicator for live trading, it is better to evaluate not only the appearance of its signals but also how those signals are generated and how they behave in real time.
An Important Note About Ready-Made Indicators
Simply because an indicator is published on TradingView or performs well on a chart does not necessarily mean that it is suitable for live trading.
When evaluating an indicator, it is worth considering questions such as:
- Do historical signals change later?
- Is a signal visible at the moment the required conditions are met?
- Does the indicator use information from future candles?
- Does its behavior in Replay match what you see on the historical chart?
- Are its backtest results representative of real market conditions?
Answering these questions can give you a much clearer understanding of an indicator’s actual performance.
Conclusion
Repainting is an important concept to understand when using indicators and strategies in TradingView.
Sometimes an indicator displays highly accurate signals on a historical chart, but those signals may have been generated or modified using future information. Under such circumstances, what we see today on the historical chart is not necessarily what would have been available to a trader at the time.
For this reason, simply observing an indicator’s historical performance or the results of a backtest is not enough to evaluate its real-world performance.
Understanding Repainting and examining an indicator’s behavior under conditions close to Real-Time can help prevent many misleading conclusions and allow you to make a more accurate assessment of an indicator or strategy before using it.
This is important even for users who have no programming knowledge and simply rely on ready-made TradingView indicators.