Does SuperTrend repaint?
Two tests: one on closed candles, one on every tick of the forming candle. SuperTrend fails the first a handful of times. The second shows that more than half of its live trend flips never happen.
Yes, rarely on closed candles — and more than half of the trend flips it shows live never happen. Across 22,111 hourly candles of gold, the SuperTrend line changed after the close on 16 candles, by up to $16.13. Replayed on 306.8 million real ticks, it showed 695 trend flips that were gone by the close, against 593 that stayed: 54% of the flips you would have seen live.
SuperTrend is one of the most popular trend indicators for MetaTrader, and its colour change is the signal most people trade. “Does it repaint?” needs two tests, because the word covers two different things: a finished candle that changes later, and a signal that appears and disappears while the candle is forming. We ran both.
What was tested
- The indicator:
supertrend.mq5by FxGeek, the most viewed SuperTrend in the MQL5 Code Base. Default settings (ATR 10, multiplier 3). - The market: XAUUSD, 1-hour chart, January 2023 to October 2026.
- Test 1, closed candles: all four buffers (two fill buffers, the line and its colour) recorded the moment each candle closes, then read again fifty candles later. How the test works.
- Test 2, the forming candle: the trend colour read on every single tick of every candle — 306.8 million real ticks — timed, and compared with the colour the candle closed with.
Test 1: closed candles — failed, 16 times
16 line values changed after the close
0 colour values changed after the close
$16.13 largest move (2025.08.26 02:00)
By the strict definition — a closed candle must never change — SuperTrend repaints. Not often, and never the colour: only the line value, only on the candle right before a trend flip. The cause is one line in its code. When the trend flips on a candle, it overwrites the line of the candle before it:
SuperTrend[i-1] = SuperTrend[i-2];
When that flip happens while the next candle is still forming, a candle that has already closed gets a new value. These are all 16:
| closed candle | line at close | line later | moved |
|---|---|---|---|
| 2025.08.26 02:00 | 3373.96 | 3357.83 | -16.13 |
| 2023.04.12 14:00 | 2021.44 | 2008.12 | -13.32 |
| 2024.08.15 14:00 | 2450.06 | 2462.97 | +12.91 |
| 2025.05.06 23:00 | 3386.25 | 3380.12 | -6.13 |
| 2023.07.06 14:00 | 1917.04 | 1912.17 | -4.87 |
| 2026.05.22 23:00 | 4554.52 | 4558.07 | +3.55 |
| 2026.04.02 03:00 | 4706.69 | 4703.80 | -2.89 |
| 2026.06.17 20:00 | 4317.53 | 4315.08 | -2.45 |
| 2024.10.07 14:00 | 2642.34 | 2640.81 | -1.53 |
| 2023.06.29 16:00 | 1910.84 | 1912.33 | +1.49 |
| 2024.02.29 14:00 | 2036.27 | 2036.98 | +0.71 |
| 2024.02.13 14:00 | 2021.56 | 2021.17 | -0.39 |
| 2023.08.04 15:00 | 1939.69 | 1939.92 | +0.23 |
| 2024.02.16 14:00 | 2001.47 | 2001.25 | -0.22 |
| 2023.12.15 14:00 | 2033.85 | 2033.63 | -0.22 |
| 2023.06.15 15:00 | 1944.85 | 1945.05 | +0.20 |
Test 2: the forming candle — the flips that never happened
SuperTrend decides the trend by comparing the close with yesterday’s band. On a forming candle, “close” is the live price, so the trend can flip on a spike and flip back before the candle ends. Each of those flips looks exactly like a real signal while it is on screen.
695 ghost flips: shown on a forming candle, gone by its close
586 of the real flips appeared mid-candle, not at the open
118 ghost flips on screen for 15 minutes or more
39 ghost flips on screen for 30 minutes or more
A typical ghost flip lasted 3 minutes; the longest stayed 56 minutes before the trend snapped back. They cluster around the US session and data releases — one candle in the hour of the Fedone candle on the evening of the Fed’s September 2024 rate decisionrsquo;s September 2024 rate decision flipped 48 times and still closed in the direction it opened.
By the definition on our non-repaint page, Test 2 is not repainting: the candle was still forming. It matters anyway, because many SuperTrend alerts and EAs read the forming candle. Every one of these 695 ghost flips could have sent an alert or opened a trade for a trend change that is not on the chart afterwards.
What it means if you use it
- Act on a flip only after the candle closes. 54% of the flips shown live were gone by then.
- In an EA, read the colour of the last closed candle (shift 1), not the line. The colour never changed after the close; the line did 16 times.
- Backtests are close to honest. Only 16 closed values changed, so history is nearly what you would have seen. What history cannot show you is the 695 flips that came and went.
The same two tests on Agimat FX
We run every test on our own indicator first. Agimat FX Gold, same market, same candles, same 306.8 million real ticks:
0 arrows that vanished, of 1,102
Agimat FX signals print on the closed candle, so an arrow that appears is the arrow that stays — on the forming candle, at the close and fifty candles later. Non-repainting is the minimum, not the reason to buy it: what it adds is shown on real charts — signals from the daily chart down to one minute, and an EA that can take them for you and let winners run behind a trailing stop.
Check it yourself
- supertrend-repaint-audit.csv — Test 1, every candle and buffer, at the close and fifty candles later · config: supertrend-repaint.ini
- supertrend-color-audit.csv — Test 2, every candle: first colour, final colour, number of changes, seconds in each colour · config: supertrend-color.ini
- agimat-intrabar-audit.csv — Test 2 on Agimat FX · config: agimat-intrabar.ini
- IndiProbe.ex5 and ColorProbe.ex5 — both probes, to run the same tests on any indicator you own
Be told when the new build is ready
Two emails: when it opens, and the day before launch. Nothing else.
The list hears first.