Skip to content
MT5MT4soonTradingViewsooncTradersoonNinjaTradersoonPythonsoon
IndicatorTrend indicatorsMT5No repaint

EMA Lead Gauge

Free EMA Lead Gauge indicator for MT5: slope-colored EMA, SMA reference, EMA turn arrows and a lead panel. Lab repaint test: 0 of 467 signals changed.

Add to a kit
CompareRequest a variant
Embed
EMA Lead Gauge on XAUUSD M15, MT5 chart with default settings: ema line, sma reference, ema turn up
Screenshots from a real MT5 chart · 9 · scroll sideways
EMA Lead Gauge inputs window in MetaTrader 5 with the default settings
EMA Lead Gauge inputs window in MetaTrader 5 with the default settings
EMA Lead Gauge EMA Turn Up arrow on XAUUSD M15, 27 Oct 2026 13:15
EMA Lead Gauge EMA Turn Up arrow on XAUUSD M15, 27 Oct 2026 13:15
EMA Lead Gauge EMA Turn Up arrow on XAUUSD M15, 27 Oct 2026 02:45
EMA Lead Gauge EMA Turn Up arrow on XAUUSD M15, 27 Oct 2026 02:45
EMA Lead Gauge EMA Turn Down arrow on XAUUSD M15, 26 Oct 2026 15:45
EMA Lead Gauge EMA Turn Down arrow on XAUUSD M15, 26 Oct 2026 15:45
EMA Lead Gauge on XAUUSD H4 (another timeframe)
EMA Lead Gauge on XAUUSD H4 (another timeframe)
EMA Lead Gauge on XAUUSD M5 (another timeframe)
EMA Lead Gauge on XAUUSD M5 (another timeframe)
EMA Lead Gauge on-chart panel: last signal and status
EMA Lead Gauge on-chart panel: last signal and status
EMA Lead Gauge on EURUSD M15
EMA Lead Gauge on EURUSD M15
EMA Lead Gauge zoomed out on XAUUSD M15: several weeks of history
EMA Lead Gauge zoomed out on XAUUSD M15: several weeks of history
Test verdictPassed
Repainted
0 / 467
Signals / week
≈ 35.6
Tested on
EURUSD M15
Tested
2026-10-09
Download free · Google DriveFree account needed · sign in with Google in one clickFree — share it freely. Just don’t sell, crack or modify it. Licencev1.00 · 101.5 KB · .ex5
Lab pick — built by the lab, not from a member request. Want something like it? Request a tool

Overview

The EMA Lead Gauge indicator for MT5 is for traders who use moving averages and want to check on their own chart whether the EMA really turns before the SMA. On your main price chart it draws an EMA line colored by its own slope, a dotted SMA of the same period, arrows where the EMA has turned up or down, and a Lead Gauge panel. In the Lab's repaint test, 0 of 467 arrows changed after they appeared. Only 10.9% of them were followed by a 1 ATR move in the arrow's direction first, so it is not a ready-made entry signal.

What it draws on your chart

The EMA (exponential moving average) usually reacts sooner than the SMA (simple moving average); the panel measures by how much on your chart.

  • EMA Line: the EMA of your chosen period, colored by its slope measured against ATR(14). The color tells you whether it is rising, falling or flat.
  • SMA Reference: a dotted SMA with the same period and price, drawn only so you can compare the two.
  • EMA Turn Up / EMA Turn Down: arrows at confirmed low and high points of the EMA itself. They mark turns of the EMA, not of price.
  • Lead Gauge panel: shows the last confirmed EMA turn with its strength, the EMA value and slope, the SMA value, and how far price is from the EMA in points and in ATR. It also shows how many bars, on average, the EMA turned before the SMA, and the share of turn pairs where the EMA turned first.

How the Lab tested repainting

The Lab ran version 1.00 on EURUSD M15 from 2026-07-09 to 2026-10-08, using Raw Trading Ltd real ticks on MT5 build 6230. It logged 467 arrows as they appeared, and 0 of them later changed or disappeared. The longest delay between a turn and its arrow was 3 bars.

For you, this means an arrow you see on past bars is an arrow you would also have seen live, after the confirmation delay explained below.

What price did after the arrows

About 88% of the 467 arrows saw price move 1 ATR against the arrow first (100% − 10.9% − 1%). The Lab checked, within 20 bars, whether price moved 1 ATR in the arrow's direction or 1 ATR against it first. The figure shows the share that went with the arrow, by arrow type.

EMA Lead Gauge Lab test, EURUSD M15: share of arrows where price moved 1 ATR WITH the arrow first (rest mostly went agaiIllustration
Turn Up: 1 ATR in arrow direction first
11.3% of 231
Turn Down: 1 ATR in arrow direction firs
10.6% of 236

Scale zoomed in to show the difference (bars do not start at zero).

Across all arrows, only 10.9% reached 1 ATR in the arrow's direction first, and 1% reached neither level within 20 bars (1.3% of Turn Up and 0.8% of Turn Down arrows). The median time to reach a level was 1 bar, so the outcome was usually settled almost at once.

In plain words: on EURUSD M15 in this test, buying every Turn Up arrow or selling every Turn Down arrow went the wrong way far more often than the right way. The arrow tells you about the EMA, not about the next move. The Lab has not tested trading against the arrow, so don't treat it as a reverse signal either.

Expect a busy chart. On M15 the test produced 35.6 arrows per week: 17.6 Turn Up and 18 Turn Down.

How it works

  1. 1
    Computes an EMA of the chosen price, seeded with a simple average, plus a reference SMA.EMA = Price x k + EMA_prev x (1 - k), k = 2 / (EmaPeriod + 1)Inputs: EmaPeriod, AppliedPrice, ShowSmaReference
  2. 2
    Measures EMA slope over a few bars in ATR units and colors the line up, down or flat.Slope = (EMA - EMA some bars ago) / ATR(14)Inputs: SlopeLookback, SlopeFlatThresholdAtr
  3. 3
    Marks an EMA turn once confirmed by bars on each side. Strength 1 to 5 reflects the move size.Strength steps up at move / ATR of 0.1, 0.25, 0.5 and 1.0Inputs: PivotConfirmBars
  4. 4
    Matches each EMA turn to the next same-direction SMA turn within three periods, and records the lead in bars.Lead = SMA turn bar - EMA turn barInputs: LeadSampleCount

Specifications

Platform
MetaTrader 5
Version
1.00
Type
Indicator
Window
Main chart
Draws
2 lines, 2 arrows, 1 panel
Alerts
popup, push, sound
Repaints
No (0 of 467 signals changed)
Inputs
15
Tested on
MT5 build 6230 · 2026-10-09

Repaint test

Signals logged live
467
Changed after close
0
Arrow delay
3 bars

No repaint detected. In a 9 Jul 2026 – 8 Oct 2026 test on EURUSD M15 (Raw Trading Ltd real ticks), 467 signals were logged at bar close and re-read at the end of the test: 0 changed. Arrows appear up to 3 bars after the event they mark.

IndicatorFree — tested 2026-10-09 · MT5 build 6230 · Raw Trading Ltd real ticks. Results come from historical data, not live trading, and do not guarantee future results.

Signal statistics

Price moved 1×ATR in the signal direction first10.9%
Price moved 1×ATR against it first88.1%
Neither within 20 bars1%

Over 9 Jul 2026 – 8 Oct 2026 on EURUSD M15, the indicator printed 467 arrows. After 10.9% of them, price moved 1×ATR(14) in the arrow's direction before moving 1×ATR against it (median 1 bars). 1% reached neither level within 20 bars.

This measures price movement after the arrow, not a trading result. It includes no spread, commission, stop loss or position sizing.

What it draws

  • A line (EMA Line) from buffer 0.
  • A line (SMA Reference) from buffer 2.
  • Arrows (EMA Turn Up) from buffer 3, drawn on the closed bar.
  • Arrows (EMA Turn Down) from buffer 4, drawn on the closed bar.
  • An on-chart panel (Lead Gauge); values shown in the panel are not exposed as buffers.

Inputs

InputDefaultWhat it does
EmaPeriod20EMA period N, also used for the reference SMA (2-500)
AppliedPriceClosePrice used for the EMA and the reference SMA
ShowSmaReferencetrueDraw the dotted SMA of the same period for visual comparison
PivotConfirmBars3Bars K on each side to confirm an EMA turn (signal delay = K bars, 2-10)
LeadSampleCount20Latest EMA/SMA turn pairs used for the average lead (5-100)
SlopeLookback5Bars back used to measure the EMA slope for the line color (2-50)
SlopeFlatThresholdAtr0.1Slope below this many ATR(14) is shown as flat (0.0-1.0)
AlertPopuptruePopup alert when an EMA turn is confirmed
AlertPushfalsePush notification when an EMA turn is confirmed
AlertSoundfalsePlay a sound when an EMA turn is confirmed
DashShowtrueShow the on-chart panel
PanelScale1Panel size multiplier (screen DPI is applied automatically)
PanelCornerLeft UpperChart corner for the panel
ThemeDarkChart color theme
RestoreThemetrueRestore the original chart colors when the indicator is removed

How to read it

Install: copy the file (101.5 KB, version 1.00) into your MQL5\Indicators folder, refresh the Navigator and drag it onto a chart. It runs in the main chart window, not a sub-window.

Reading the EMA line color

The line compares how far the EMA moved over the last SlopeLookback bars (default 5) with ATR(14). If that move is smaller than SlopeFlatThresholdAtr × ATR (default 0.1), the line shows as flat. Otherwise it shows as rising or falling.

The Lab did not split results by line color, so treat a flat line as a reason to be cautious, not as a tested filter.

How an EMA turn arrow forms

An EMA Turn Up fires when the EMA of one bar is strictly lower than the EMA of the PivotConfirmBars bars before it and the same number of bars after it. An EMA Turn Down is the mirror case: a strictly higher EMA than its neighbors on both sides. Only closed bars count, so the turn can only be confirmed once K bars have closed after it. The drawing below shows this, along with the lead the panel measures.

How an EMA Turn Up is confirmed and how the lead over the SMA is measured
Illustration of a typical signal, not a Lab result: the EMA bottoms first, the turn is confirmed only after PivotConfirmBars closed bars, and the gap to the SMA's own low is the lead shown in the panel.

The delay is fixed and known: with the default of 3, a confirmed turn is always at least 3 bars old when you see it.

Reading the Lead Gauge panel

  • Last confirmed turn and strength: which way the EMA last turned. Use it to tell whether the EMA is currently in an up-phase or a down-phase.
  • EMA value, slope and SMA value: where both lines sit right now.
  • Distance to the EMA in points and ATR: how far price has already moved from the EMA. A large ATR distance means much of the move happened before you saw the arrow.
  • Average lead and share of pairs where the EMA led: measured over the last LeadSampleCount EMA/SMA turn pairs on the chart you are looking at. If the share is low on your symbol and timeframe, the EMA is not giving you an earlier read there, so stop assuming it does.

The inputs that matter most

InputDefaultRangeWhat changing it does
PivotConfirmBars32-10Higher means fewer turns, confirmed later. Lower means earlier turns and more arrows from small wiggles. The arrow delay equals this value.
EmaPeriod202-500Sets both the EMA and the SMA. A longer period gives slower, rarer turns.
LeadSampleCount205-100More pairs give a steadier lead average that adapts more slowly.
SlopeFlatThresholdAtr0.10.0-1.0A higher value shows more of the line as flat.
SlopeLookback52-50The number of bars used to measure slope. A longer window gives a smoother color.

AppliedPrice (default Close) applies to both lines. DashShow, PanelScale, PanelCorner, Theme and RestoreTheme only change how things look.

Alerts

Alerts fire when a turn is confirmed on a closed bar, at the same moment the arrow appears. AlertPopup is on by default and shows in the platform's alert window. AlertPush sends a notification to the MT5 app on your phone, and AlertSound plays a sound. Both are off by default.

A decision rule for each arrow

  • EMA Turn Up: read it as "the EMA has stopped falling", not "buy now". Look for longs only if the line is no longer flat and the panel shows price within 1 ATR of the EMA. Then wait for your own entry trigger. Skip it if the panel shows price more than 1 ATR above the EMA (a starting point, not tested by the Lab).
  • EMA Turn Down: the mirror case. Look for shorts only if the line is falling rather than flat and the panel shows price within 1 ATR of the EMA. Skip it if price is more than 1 ATR below the EMA (also a starting point, not tested by the Lab).
  • The common misread: on past bars, the arrow seems to sit right at the low or high, so it looks perfectly timed. Live, it arrived PivotConfirmBars bars later. To check, scroll back, cover the bars to the right of an arrow, and count the bars until it would have appeared.

Installation

  1. 1Download EmaTurnLeadGauge.ex5 from the button above (Google Drive).
  2. 2In MetaTrader 5: File → Open Data Folder → MQL5 → Indicators. Copy EmaTurnLeadGauge.ex5 there.
  3. 3Restart MT5 or right-click Indicators in Navigator → Refresh.
  4. 4Drag EMA Lead Gauge onto a chart. For push alerts, enable "Allow push notifications" under Tools → Options → Notifications.
  5. Tested on MT5 build 6230.

Key terms and guides

Entry Trigger
An entry trigger is the specific event on the chart, such as a candle closing past a level or price breaking a small swing, that tells you to open the trade now instead of only watching the setup.
Moving average
A moving average is a line drawn from the average closing price of a set number of recent candles, recalculated on every new candle. It smooths out price noise and shows which way the trend is pointing.
Symbol
A symbol is the short code a trading platform uses to name one tradable market, such as EURUSD for the euro against the US dollar or XAUUSD for gold. Every quote, chart and order is tied to exactly one symbol.
Price Swing
A price swing is one move in a single direction, from a turning low to a turning high or the reverse. You measure it in pips from one swing point to the next.

More on this subject: Trend & moving averages guide, terms and tools

User reviews

No reviews yet. Members who download the tool can review it here.

Write a review

Sign in and download the tool to review it.

Build a checklist with it

EMA Lead Gauge does one job on the chart: trend / context. Put it on the same chart as the tools below and the IndicatorFree panels merge into one checklist card, ordered trend, zone, signal, risk.

  • Zone / levelKey Level MapAdds where price is: the zones and levels that EMA Lead Gauge does not draw.
  • Entry signalClimax VolumeAdds the entry signal: the moment to act once EMA Lead Gauge has set the scene.

The Lab has not tested these combinations. Each tool is tested on its own; the card only lines up what each one says. Free members get 2 new tools a day. If one has to wait until tomorrow, install BlackBox to raise the limit to 5 a day (20 on a live account).

FAQ

Does EMA Lead Gauge repaint?

No repaint detected. In a 9 Jul 2026 – 8 Oct 2026 test on EURUSD M15 (Raw Trading Ltd real ticks), 467 signals were logged at bar close and re-read at the end of the test: 0 changed. Arrows appear up to 3 bars after the event they mark.

Can I use EMA Lead Gauge in an EA?

Yes. Read buffer 3 (EMA Turn Up) with iCustom() on bar 1 — the last closed bar.

Why can’t my EA read the zones?

Zones and the panel are chart objects, not indicator buffers, so iCustom() does not return them.

How do I get alerts on my phone?

Enter your MetaQuotes ID under Tools → Options → Notifications, tick "Enable push notifications", and keep the push alert input on.

Does it work on other pairs?

Tested on EURUSD only; other symbols not tested.

Does EMA Lead Gauge work on H4 or daily charts for swing trading?

It runs on any timeframe, and on a swing chart you could start with PivotConfirmBars 5 for fewer, larger turns, a value the Lab has not tested.

Does EMA Lead Gauge work on MT4?

No. Version 1.00 is built for MT5 and was tested on MT5 build 6230; an MT5 indicator file does not run in MT4.

Can I set it to a 50 or 200 period?

Yes. EmaPeriod accepts 2 to 500, and the dotted SMA always uses the same period. Longer periods give far fewer turns. Those settings are untested by the Lab, so compare them with the default 20.

Will it change my chart colors?

It applies its Theme (Dark by default) while it runs. With RestoreTheme left on, your original chart colors come back when you remove the indicator.

Changelog

  • 1.00Initial release: EMA line colored by its own ATR-normalized slope, dotted reference SMA of the same period, confirmed non-repainting EMA turning-point arrows (closed bars only, fixed PivotConfirmBars delay), Lead Gauge. · 2026-10-09

Final verdict

What it does well

EMA Lead Gauge keeps a fixed record of when the EMA changed direction: every one of the 467 arrows logged in the Lab stayed where it first appeared. Their delay is fixed by a single input, so you always know how late a turn is.

The panel is the unusual part. Most EMA-versus-SMA advice is taken on faith. Here you can read on your own symbol and timeframe how many bars the EMA actually led and how often it led at all.

Where it falls short

The arrows are not trade entries. The Lab's follow-through test on EURUSD M15 showed price usually moved 1 ATR against the arrow before it moved 1 ATR with it. The Lab tested only EURUSD M15, so it has no results for other symbols or timeframes.

Who should skip it

Skip it if you want arrows you can buy or sell on their own, or if you scalp and need to act on the bar where the turn happens. Keep it if you already have an entry method and want trend-direction context, plus a measured answer to "does the EMA really turn first here?".

EMA Lead Gauge: use it when / skip it when
Use it when
  • –You want a non-repainting record of EMA direction changes
  • –You want to measure the EMA's lead over the SMA on your own symbol
  • –You already have an entry trigger and need direction context
Skip it when
  • –You want an arrow to trade on its own
  • –You need the turn on the bar it happens

Settings to start with

On M15, start with the defaults. The Lab results do not list the inputs used, but the 3-bar maximum arrow delay matches the default PivotConfirmBars of 3, which suggests the test ran on defaults. On H1 or H4, try PivotConfirmBars 5 for fewer, larger turns. This is not tested by the Lab, so compare it with the default. For slower swing context, try EmaPeriod 50, which is also an untested starting point. If the chart still looks noisy, raise SlopeFlatThresholdAtr so more of the chop shows as flat.

An idea to pair it with

Try adding DMI and only read EMA turns while ADX shows a trend is present, an idea to test yourself because the Lab has not tested this pair.

More trend indicators tools