Trading Education

The Non-Repaint MT4 Indicator Guide for Serious Traders

How to install, verify, and test a non repaint MT4 indicator: step-by-step workflow, spotting fake signals, and what to confirm before going live.

By Pyrem R. 7 min read

There are hundreds of custom indicators on MT4 marketed as non-repainting. Most fail this test the moment you run it. Not because every developer is dishonest, but because MT4’s architecture makes repainting the easiest outcome when indicator code is written without care.

This guide covers the installation workflow, the verification test anyone can run in under 10 minutes, and the specific code patterns that cause a repainting indicator to look clean until you check it properly.

Key Findings

  • MT4 recalculates on every tick: The indicator engine fires on each incoming tick and updates all visible bars. Signals can shift multiple times during a live candle.
  • A 10-minute test reveals repainting: Screenshot closed-bar signals, wait for new bars, then compare. Any movement disqualifies the indicator.
  • The buffer-index trick is the most common fake: Signals written to past-bar positions keep changing until the current bar closes, producing a retroactively perfect chart.
  • Strategy Tester visual mode is the gold standard: Step through historical bars one at a time to see exactly what the indicator showed at each moment.

How MT4’s indicator engine works

MetaQuotes Software released MetaTrader 4 in 2005. The indicator engine was designed to run the start() function on every incoming tick and recalculate all visible bars. That design made charts feel responsive, but it created a structural gap: any indicator whose formula writes to a past bar index, or uses the close price of a candle that has not finished, will show different signals depending on when you look at the chart.

In MT4’s model, Buffer[0] is the current forming bar, Buffer[1] is the previous closed bar, and so on. A developer who writes Buffer[1] = someValue; inside the tick calculation is updating the previous bar on every tick of the current candle. That value keeps changing until the current bar closes. When the bar does close, the signal has settled on what looks like a perfectly timed entry in hindsight.

MT5 partially addressed this by adding prev_calculated to the OnCalculate() function, making it straightforward for developers to skip recalculation of already-closed bars. MT4 has no equivalent native mechanism; a developer must build that guard manually, and many do not.

MT4 Repainting Verification Workflow1Loadindicator2Takescreenshot3Wait 5-10new bars4Comparevs screenshot5Moved?= repaints

How to install a custom indicator in MT4

  1. Copy the .ex4 (compiled) or .mq4 (source) file into your MT4 MQL4/Indicators/ folder. The typical path is C:\Users\YourName\AppData\Roaming\MetaQuotes\Terminal\[terminal ID]\MQL4\Indicators\.
  2. In MT4, right-click the Navigator panel and choose “Refresh”, or press F5.
  3. Find the indicator under “Custom Indicators” in the Navigator. Double-click to open the settings dialog and add it to a chart.
  4. After the indicator loads, watch whether it draws signals on clearly closed bars. An indicator that places arrows only on the forming candle and nowhere else is not ready to trust. It is either hiding its historical output or calculating only on the live bar to mimic non-repainting behaviour.

The install step confirms the file loaded without error. The real check starts now.

How to test for repainting in under 10 minutes

Load the indicator on a chart showing at least 50 closed bars. Take a screenshot of every signal on bars where the candle is fully closed β€” not the right-edge candle still forming. Write down bar times if the screenshot is hard to read at a glance.

Leave the chart running. Return after five to ten new bars have formed. Compare your screenshot to the current chart. If any signal moved position, changed colour, or is no longer there, the indicator repaints. That is the complete test.

For a more rigorous check, open MT4’s Strategy Tester (Ctrl+R), select any EA that uses the indicator or a test script, enable “Visual mode”, pick a historical date range, and step through bar by bar. Note each signal as it appears. When you fast-forward to the end, compare your notes to the final chart. Any difference is repainting.

Entry 1
Feature Signal at bar close
Repainting indicator May change on next tick or bar
Non-repaint indicator Locked to that bar permanently
Entry 2
Feature Strategy Tester vs live chart
Repainting indicator Signals differ
Non-repaint indicator Signals match
Entry 3
Feature Buffer index used
Repainting indicator [1], [2], or higher (past bars)
Non-repaint indicator [0] only, written at bar close
Entry 4
Feature Backtesting reliability
Repainting indicator Misleading (hindsight trades)
Non-repaint indicator Accurate β€” matches live view

RelicusRoad Pro

Have you been trading for a while but have never made consistent profits or are you new to FOREX trading and want to get a head start? Try RelicusRoad and you'll never look back.

Get RelicusRoad Pro

Common fake-signal traps on MT4

The most common pattern is the buffer-index write. A signal gets written to Buffer[1] or higher inside the current tick’s calculation. The arrow appears on the previous bar and keeps repositioning until the current bar closes. By then, the signal has settled on what looks like a precisely timed entry from the past.

A second pattern involves smoothing functions that use future bars in their formula. The indicator produces a smooth, confident line in history because it had subsequent price data when calculating. On a live chart, the same formula has no future bars, so the output is noisier and less decisive. The gap between historical appearance and live behaviour is not random β€” it is structural.

Third, some indicators apply a filter meant to stop signals from printing on the forming candle. When that filter has a logic error, signals shift between the current and previous bar on every tick rather than locking to one position. It looks like updating, not repainting β€” but the effect is identical.

None of these are visible on a finished historical chart. They show up only through the screenshot test or the Strategy Tester step-through.

What makes an MT4 indicator genuinely non-repainting

A clean non-repaint MT4 indicator uses Close[1] β€” the confirmed close of the previous bar β€” not Close[0], which is the live, still-forming candle. It writes to Buffer[0] only when the bar has closed, using a check such as if (Bars > prev_bars) or an equivalent pattern that detects a new bar opening.

Once a bar closes, that bar’s index shifts from [0] to [1] and is never touched again. What you saw when the bar was live is what remains when you scroll back a week later. That is the whole test.

How RelicusRoad Pro handles this in MT4

RelicusRoad Pro calculates its entry signals β€” Dynamic Reversals and the associated signal arrows β€” at bar close. Each signal locks to that bar’s index once the candle closes. No recalculation on subsequent ticks, no retroactive repositioning.

If you traded a Dynamic Reversal signal at 14:00 on a Wednesday, that signal is still in the same place when you review your journal the following week. That consistency matters for more than record-keeping. When the chart shows exactly what the indicator displayed at entry, your review is grounded in reality. You can ask whether your read was sound and build a process from honest data.

The dynamic overlays, Road Levels and Signal Cloud, do update as price evolves. They are structural context layers, not entry arrows. The distinction is stated clearly in the documentation.

For a full breakdown of what repainting is and how to test across MT5 and TradingView as well, see the non-repaint forex indicator guide .

Frequently asked questions

How do I verify a non-repaint indicator in MT4? Screenshot every signal on at least 20-30 fully closed bars. Wait for 5-10 new bars to form, then compare. If any arrow moved, changed colour, or vanished, the indicator repaints. MT4’s Strategy Tester visual mode confirms the same thing on historical data.

Why do MT4 indicators repaint more visibly than MT5 indicators? MT4 indicators run on every tick and recalculate all visible bars. MT5 added the prev_calculated parameter to OnCalculate() to help limit recalculation to new bars only, but MT4 has no equivalent native mechanism. Without it, every tick can rewrite the indicator’s output across all visible bars.

What is the buffer-index trick that causes repainting? Some MT4 indicators write their signal to Buffer[1] or higher inside the current tick’s calculation. Each tick overwrites that past-bar value, making signals appear to have existed at a specific prior moment. Only signals written to Buffer[0] at confirmed bar close are non-repainting.

Does RelicusRoad Pro’s MT4 version repaint its entry signals? RelicusRoad Pro calculates entry signals at bar close and locks them to that bar’s index. Signals do not recalculate on subsequent ticks or bars. What you see after a bar closes is permanent.

Can I test MT4 indicator repainting without waiting in real time? Yes. Open MT4’s Strategy Tester, select the indicator or an EA that uses it, tick “Visual mode”, choose a historical date range, and step through bar by bar. Note each signal as it appears. When you fast-forward to the end, compare what you recorded to the final chart.


If an indicator looks perfect in hindsight but produces inconsistent results when you forward-test it, run this check before going further. Ten minutes now saves months of trading against a signal that was never real.

See how RelicusRoad Pro is built for live execution on MT4 and MT5 β†’

Share: