A repainting indicator changes its signals or values on bars that have already closed. On a historical chart it can look close to perfect, with arrows at nearly every turning point. In real time, many of those arrows appeared late, moved or didn't exist while the bar was live. This guide explains why it happens and how to test any indicator for it.
What repainting means
Every indicator is a calculation on price. Most use only bars that have already happened, so once a bar closes, its indicator value is fixed. A 20-period moving average for last Tuesday's 10:00 bar is the same number today as it was at 10:00 last Tuesday.
A repainting indicator goes back and redraws earlier bars when new prices arrive. An arrow moves to a different candle, a line changes shape or a signal disappears. Scroll back through history and you only ever see the final version, never the signals that came and went.
The word gets used loosely. Traders describe four different behaviours as repainting, and only some of them are a problem. Telling them apart is the first step.
Repainting, recalculating and lagging
| Behaviour | What happens | Do closed bars change? | Is it a problem? |
|---|---|---|---|
| Recalculating the open bar | The value on the current bar moves with every tick and becomes fixed when the bar closes. | No | No. Every indicator works this way. Wait for the close. |
| Lagging | The indicator reacts late because it averages past prices. | No | No. It's a trade-off, not a deception. |
| Delayed plotting | A signal is confirmed a few bars later but drawn on the earlier bar where the swing happened. | New marks appear on old bars | Only if you assume the signal was visible on that bar. |
| True repainting | Values or signals on closed bars change, move or vanish as new prices arrive. | Yes | Yes, for anyone using it as a signal. |
Recalculating the open bar is normal
RSI on the current bar moves up and down with each tick, and a moving average cross can appear and disappear before the bar closes. This is sometimes called intrabar repainting. It isn't a flaw, because the indicator can't know the close before it happens. The fix is to act only on closed bars.
Lagging is a cost, not a trick
A moving average crosses after a move has started because it averages prices that already happened. That makes it late, but its history is honest: what you see on old bars is exactly what you would have seen at the time.
Delayed plotting is easy to misread
A swing high can only be confirmed once price has moved away from it. Bill Williams' Fractals, for example, need two bars on each side of a high or low. The arrow appears two bars after the swing but is drawn on the swing bar itself. On a historical chart it looks like the indicator called the top, when it actually said so two bars later.
Why some indicators repaint
Swing and pattern detection
ZigZag is the classic example. It joins swing highs and lows, but the most recent leg keeps extending while price makes new extremes, and the latest pivot can move or disappear entirely. Older pivots settle once later swings confirm them. Fractals can also appear and then vanish while their confirming bars are still forming.
Future bars and centered calculations
Some indicators use bars to the right of the one they plot. A centered moving average averages bars on both sides of each point, so its line on recent bars keeps being recalculated as new bars arrive, and its history uses prices that didn't exist yet. Many widely shared “centered” band indicators work this way. Some tools sold as “no-lag” or “zero-lag” get there by the same route, although plenty of low-lag formulas are honest.
Shifted plots
Some lines are deliberately drawn in the past. Ichimoku's lagging span plots the closing price 26 bars back by default. It doesn't repaint, but on a historical chart it can look as if it predicted moves that were already over when it was drawn.
Multi-timeframe indicators
An indicator that shows H4 values on an M15 chart has to wait for the H4 bar to close. Until then, its value changes across all sixteen M15 bars inside that H4 bar. Many multi-timeframe tools then paint the final H4 value across all of them in history, so a signal looks as if it was there from the first M15 bar.
Whole-history calculations
Some indicators rescale every bar when something new happens, for example by normalizing an oscillator to the highest and lowest values on the whole chart. When a new extreme appears, every past value shifts. Coding mistakes that read the wrong bar index can cause the same effect.
Why it misleads traders
Repainting matters because traders judge indicators by looking at history:
- Chart reviews look too good. Scroll back and every arrow sits near a turning point. Sales pages and videos built from historical charts show the same flattering view.
- Alerts don't match the chart. An alert fires at one price, and later the arrow sits on a different bar at a better price.
- EAs disappoint. The strategy tester feeds an indicator only the bars that have already happened, so an EA that trades a repainting signal usually backtests far worse than the chart suggested. The tester is showing the signals as they really arrived.
The lesson is to judge a signal indicator by what it shows in real time, not by its finished history. Our guide on how to evaluate an expert advisor applies the same thinking to EAs.
How to test an indicator for repainting
You don't need to read code. You need a demo account, a chart and some patience.
- Ask the developer first. Ask which bar each signal is drawn on and at what moment it becomes final. A clear answer such as “arrows appear at the close of the signal bar and never change” is a good sign. A vague one isn't.
- Run the screenshot test. Attach the indicator to a demo chart on a fast timeframe such as M5 or M15. Take a screenshot and note the time. After several hours, take another screenshot of the same stretch of bars. Any change on a closed bar means it repaints.
- Run the refresh test. After it has run live for a while, switch the chart to another timeframe and back, or right-click the chart and choose Refresh. The indicator recalculates its whole history. If the signals now differ from what you watched form, the history version uses information that wasn't available in real time.
- Check the Data Window. Open it with Ctrl+D, hover over a closed bar and note the indicator's values. Come back later and check the same bar. The numbers should be identical.
- Use the strategy tester's visual mode. Select the indicator in the tester, tick visual mode and play a stretch of history slowly. Watch where signals appear as each bar forms, then compare them with the same period on a normal chart.
- Compare alert times with arrow positions. Turn on the indicator's alerts. If an alert fires two or three bars after the bar the arrow is drawn on, the indicator plots its signals late.
Run these checks over a few days that include both quiet and fast markets. Some indicators only repaint when price makes a new high or low, so a calm afternoon can hide the problem. Our backtesting guide explains visual mode and the tester settings in more detail.
Using an indicator that repaints
A repainting indicator isn't automatically useless. ZigZag is a good way to mark swing structure and to pick swing highs and lows for the Fibonacci calculator. Fractals help mark recent swing points for stop placement. The trick is to use them for what they show reliably.
- Use them for context, not timing. Swing structure, support and resistance zones and trend direction are all fine. Precise entries are not.
- Act only on confirmed values. For most indicators that means the last closed bar. For delayed-plotting tools it means waiting until the signal can no longer change.
- In an EA, read closed bars. Reading shift 1 instead of shift 0 uses the last closed bar. A fractal is only final once the two bars after it have closed, which with the current bar still forming means shift 3 or later.
- Pair them with fixed levels. Levels built from completed periods don't move. Daily pivot points, worked out from yesterday's high, low and close in the pivot point calculator, stay the same all day.
Questions to ask before you buy a signal indicator
- Which bar is each signal drawn on, and when is it final?
- Does the indicator use future bars, centered calculations or data from a higher timeframe?
- Were the screenshots and videos recorded live, or taken from history after the fact?
- Is there a trial or demo version you can run the tests above on?
- If you want to automate it, which buffers can an EA read, and on which bar?
A non-repainting indicator isn't automatically a good one. It only means its history is honest, so you can judge it fairly. If you have an indicator-based strategy and want it turned into an EA that acts only on confirmed signals, our custom development service can build it to your rules.