Does TMA centered repaint?
We ran the same repaint test we publish for our own indicator on centered TMA, the line behind the popular TMA bands. Here is the result, the raw data, and why it happens.
Yes — on every bar. We replayed 22,111 bars of gold and compared what centered TMA showed when each candle closed with what it shows for the same candle fifty bars later. The line had moved on 22,110 of 22,111 bars. On 5,194 of them (23.5%) it had even changed direction: a candle that closed with the line pointing up now shows it pointing down, or the other way round.
Centered TMA — usually sold as TMA bands or TMA centered bands — has one of the best-looking histories of any MetaTrader indicator. The line bends at almost every turn, a moment before price does. This page shows why, measured, and what it means if you trade it.
What was tested
- The indicator:
tma_centered.mq5by Mladen Rakic, the original author of centered TMA, as he posted it for MetaTrader 5 on the MQL5 forum. Default settings: half length 12, close price. - The market: XAUUSD, 1-hour chart, 2022-12 to 2026-09: 22,111 bars.
- The test: the same one we publish for our own indicator. Each bar’s values are recorded the moment it closes, then read again fifty bars later. Any difference means the indicator rewrote its past. How the test works.
The result
line moved after the close 22,110
direction reversed afterwards 5,194 (23.5%)
typical move $2.89 (1 in 10 moved more than $12.69)
largest move $106.58
The one bar that did not change (August 9, 2024, 20:00) is a coincidence: it was recalculated like every other bar, and the new value happened to land on the same cent.
What it looks like
The biggest revisions in the whole test came during the gold sell-off of January 29–30, 2026. The solid line is centered TMA as it sits on the chart today. The dashed line is what it actually showed, candle by candle, while it was happening.
On today’s chart the line turns down at 09:00 on January 29. Live, it did not turn until 14:00: 5 hours later. Anyone judging the indicator by scrolling back through this chart sees a turn 5 hours earlier than anyone trading it could have acted on.
Why it repaints
It is not a bug. A centered average is calculated from the bars on both sides of each bar:
the twelve before it and the twelve after it. The code says so directly — for each bar it adds
prices[i+j], the bars that come later.
For the newest twelve bars, those later bars do not exist yet, so the indicator uses what it has and recalculates as each new bar arrives. Every bar keeps changing until twelve more have closed after it. That is why the history looks so smooth and so well-timed: by the time you look back, every point on the line has been finished with information from the future.
Its author has always said this. In the same forum thread he wrote that the centered version is for estimating, not for signals. The repainting is documented — it is the way it gets sold, as an entry signal with a perfect-looking history, that is the problem.
What it means if you use it
- Do not judge it by its history. Every turn you see when scrolling back was drawn with twelve hours of hindsight on this chart, and with the equivalent on any other timeframe.
- TMA bands repaint the same way. The bands are built around this centered line, so they move with it. We tested the line itself.
- Arrows built on it inherit it. “TMA band touch” arrows and alerts placed on the bands can appear, move or disappear for the same reason.
- If you want a TMA that holds still, use an end-pointed (non-centered) version. It only uses past bars, so it does not repaint — and it lags, which is exactly the honest price of not knowing the future.
The same test on Agimat FX
We run this test on our own indicator first. Agimat FX Gold, same probe, same market, same 22,111 bars: 0 values changed. Every arrow sits where it printed. The full audit and its raw data.
Non-repainting is the minimum an indicator owes you, not the reason to buy one. What Agimat FX adds on top is shown on real charts and in a short video on the home page: 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
- tma-repaint-audit.csv — every bar, its value at the close, its value fifty bars later, and whether it changed
- tma-repaint.ini — the exact Strategy Tester config
- IndiProbe.ex5 — the probe, to run the test on any indicator you own
Be told when the new build is ready
One message. Nothing else, ever.
The list hears first.