What is “repainting”? Why is it important that the script you use does not do it?
Repainting, generally, is re-drawing or changing visual properties. In the context of technical analysis and charting, repainting means the change of historical data, such as signals and visual plots, with the flow of time.
Historical results, generated by scripts which repaint, are often quite appealing, even perfect-looking. This can easily mislead many users and traders in their expectations and give false analysis data. As a result, users may make irrational trading decisions.
A lot has been written on the topic of repainting.
In this article, we will show 3 easy ways to check if a script does not repaint.
Throughout the TradingView community, one of the most asked questions is: “Does it repaint?”
Method 1
Simply add the script to a chart, and start creating an alert. In the alert settings, choose the condition as the script at question.
If the script repaints, you will notice a yellow exclamation mark next to the alert window heading. Click on it to see TradingView’s warning.
Script with repaint warning
Script without repaint warning
Exceptions
In some cases, scripts may contain dashboards or other different visual plots, excluding in-built technical analysis. A warning is shown then, since such visual elements need the script to have the option `calc_on_every_tick` enabled. This option updates visuals, such as dashboards, on every single tick, making them show data in real-time. On the other hand, it may generate ‘intra-bar’ signals, also known as unconfirmed signals.
What are confirmed and unconfirmed signals?
An unconfirmed signal is such that is generated during the current candle. It is intra-bar, and can appear and disappear with the current price fluctuations. It can trigger alerts too, since it is a single like any other.
A confirmed signal is only generated when a candle closes and the price is locked-in history. It cannot trigger and disappear while the candle (let’s say 1-hour) is still ongoing.
If you are using an invite-only script, you can always contact the provider with a request for a version without such visual elements and no warning. This way you can re-assure yourself by comparing. Transparency should be the main priority for any provider.
Method 2
Use the “Replay” function on the chart to check for repainting. Before doing anything, snap a pic or record what signals there are on the chart. Click on the replay button in the chart header and go to a time back in history. Press “play”, and compare the trades during replay with the ones without replay.
If there are inconsistencies, such as missing or added trades during replay, it means that the script repaints.
Method 3
Create a simple alert with the script as a condition in the settings menu. Do not attach any messages, webhooks or notifications. Then, monitor its activity in the ‘Alerts Log’ menu. Compare instances when the alert has been triggered by time with signals on the chart. If there are inconsistencies, that means a signal was triggered but has been removed from historical data. This shows that the script repaints.
Conclusion
Here, the three easiest and fastest ways to detecting repainting of a script are shown.
Always exercise caution when using different scripts, especially if they help you make trading decisions or analyse historical performance.
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.