A repainting indicator changes its past signals after new bars arrive. On history it looks almost perfect, but live it gives late or vanishing signals. This article explains why it happens, how to test for it, and how to avoid it when you build or buy an indicator.
What repainting looks like
You see a clean arrow on the chart at a turning point. When you watched the market live, that arrow was not there at the time, or it appeared and then moved. The chart shows signals as if they were known in advance, but they were drawn afterward with information that did not exist at that moment. Strategies built on such signals fail when traded live, because the past never looked like the present.
Common causes
- Using the current open bar as if it were closed.
- Higher-timeframe data read with look-ahead.
- Zigzag and pivot logic that needs future bars to confirm a point.
More detail on each cause
Open bar values. The close of the current bar keeps changing until the bar ends. A signal based on it can appear and vanish within the same bar. Reading the last closed bar instead removes the problem, but the signal comes one bar later.
Higher-timeframe look-ahead. When an indicator reads, say, a daily value on an hourly chart, the daily bar may not be finished. If the code takes the final value of that day for every hour inside it, the early hours show information from the future. The fix is to use only data that was complete at that time.
Pivots and zigzag. A swing high needs several bars after it to be confirmed. The indicator may draw it back at the peak once confirmed, which looks perfect on history but is only known later. Such tools can be useful for analysis, but they are not entry signals.
How to test
- Run the indicator live or in the visual tester and take screenshots as signals appear.
- Compare with the same bars a few hours later.
- If any arrow moved or disappeared, it repaints.
You can also keep a chart open through a few sessions with the screenshots saved, then check them against the final history. Another test is to reload the chart or change the timeframe back and forth and see if old signals change. In an EA, compare what the code did on each bar with what the indicator shows afterward.
Non-repainting does not mean profitable
An indicator that does not repaint is only honest about its signals. It can still lose money. Test any signal on enough data and with costs included, and use risk limits. Read our guide on TradingView alerts and webhooks for a related timing issue with bar-close alerts.
What we do
Every indicator and conversion we build is checked for repainting before delivery. If your indicator, Pine Script or EA seems to give different results live than on the chart, we can review it. See custom indicators and code conversion for the scope. Pricing starts at Rs 3,000 for simple work and is shown on the pricing page. You get a working demo before final payment and 3 free revisions.
Repainting in different tools
The problem appears in MetaTrader indicators, in TradingView Pine Script and in custom code on any platform. In Pine Script, requesting higher-timeframe data without the right settings can show future values on history. In MetaTrader, an indicator buffer that is recalculated for old bars on every tick can move past signals. The cause differs by platform, but the test is the same: does the signal stay where it was first shown?
Strategy backtests can also be affected. A Pine strategy that enters on a repainting condition can show excellent history that is impossible to trade. When we convert a Pine strategy to an EA, we check each condition for this. If we find one, we tell you and suggest a version that uses closed bars only, so the EA trades what the chart would really have shown at the time.
- Prefer signals that confirm on bar close.
- Read the author's notes, since honest authors state when a tool repaints.
- Be careful with any indicator that has an unusually perfect history.
- Test with small size before trusting any new signal live.
Frequently asked questions
How can I tell if a purchased indicator repaints?
Watch it live and save screenshots, then compare them with the history later. If signals moved or disappeared, it repaints.
Can a repainting indicator be fixed?
Often yes, by using closed bars and confirmed data only. The signals will be later and fewer, and results will look less perfect on history, which is more realistic.
Does a converted indicator keep the repainting behavior?
It can, if the original logic repaints. We check for this during conversion and tell you what we find. Send the code on the contact page.