EMA to SMA MACD Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

Read the name of the ema to sma macd indicator literally. Two exponential averages build the main line. A simple average, not exponential, builds the signal over it. That mixture is what Gerald Appel originally described, and most MetaTrader builds do something else.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Separate window (levels 0)
Plots 5: MACD Line, Signal SMA, Histogram, Buy, Sell
Alerts popup
Inputs 7

The visible output

Two lines, a histogram and two marks.

`MACD Line` traces dodger blue at width 2.

`Signal SMA` traces orange red beside it.

`Histogram` fills light slate gray between them.

A reference sits at zero across the pane.

`Buy` and `Sell` marks appear on the price chart.

  • MACD Line: line, dodger blue, width 2
  • Signal SMA: line, orange red, width 2
  • Histogram: histogram, light slate gray, width 2
  • Buy: arrow, lime, width 2, arrow code 233
  • Sell: arrow, red, width 2, arrow code 234
ema to sma macd indicator: The main line, its simple signal and the columns, EURUSD H1.
The main line, its simple signal and the columns, EURUSD H1.

The build in stages

Exponential on one side

Two iMA calls supply it. `FastEMA` `12` less `SlowEMA` `26`, both exponential on the close. That difference is the main line.

Simple on the other

iMAOnArray runs the second stage. `SignalSMA` `9` takes a simple average over the main line itself, weighting all nine bars alike rather than favouring the recent ones.

Making it visible

`SignalScale` `1000000.0` multiplies the lot. A difference between two averages on a currency pair comes to a fraction of a pip, so without a multiplier the pane would draw a flat line.

What the output means

A simple signal behaves differently from an exponential one.

It lags a touch more and turns less sharply.

Column height measures the gap between the two lines.

Zero marks where the two exponential averages meet.

Values carry a scale, so compare within one chart only.

`ShowArrows` drops the marks and keeps the pane.

Alert channels in this build: popup, one message per closed bar.

A crossing between the main line and its simple signal triggers the one message this tool sends, and `AlertsOn` is the single switch above it. Messages land in the terminal on a closed bar. No phone, mail or audio route exists in this build.

Every Ema To Sma Macd Indicator input

Core settings

Setting What it does Default
FastEMA Fast EMA period. Shorter exponential average, `12`. 12
SlowEMA Slow EMA period. Longer exponential average, `26`. 26
SignalSMA SMA period for signal line. Simple average over the main line, `9`. 9
SignalScale Visual scale factor. Multiplier making the pane readable, `1000000.0`. 1000000.0

Display settings

Setting What it does Default
ShowArrows Show buy/sell arrows on chart. Draw crossing marks on price, `true`. on
ArrowOffset Arrow offset (pips). Pips between a mark and its candle, `2`. 2

Alert settings

Setting What it does Default
AlertsOn Alerts on cross. Whether a crossing raises a message, `true`. on
ema to sma macd indicator: Inputs panel, SignalSMA sitting under the two EMAs.
Inputs panel, SignalSMA sitting under the two EMAs.

Where to point it

Appel chose the classic periods for daily bars, and they still set the pace. EURUSD H1 is the reference chart, where crossings come every day or two. Drop to M5 and they arrive constantly. Move to H4 and each one spans a session.

What it will not tell you

Mixing average types makes it differ from other MACD charts.

A simple signal gives every bar in its window equal say.

The scale factor leaves height meaningless across symbols.

Three averages stacked together lag badly.

Copy the compiled Ema To Sma Macd Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Ema To Sma Macd Indicator for MT4 and MT5

The zip holds the compiled Ema To Sma Macd Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Why is SignalSMA simple rather than exponential?

Because Gerald Appel specified it that way. Most MetaTrader builds use an exponential signal instead, which is why this one’s crossings will not always line up with a standard MACD on the same chart.

What does SignalScale 1000000.0 fix?

Readability. The gap between a twelve and a twenty-six bar average on a five-digit quote is a fraction of a pip, so the pane would draw a flat line at zero without a multiplier applied to every series.

What does SignalSMA average, price or the line?

The main line itself. iMAOnArray runs over an array the indicator has already built rather than over price, which is what lets the signal smooth the MACD output instead of the closes behind it.

Does ShowArrows false change any calculation?

No. It still finds the crossings and still raises alerts; only the marks on the price chart stop appearing, which suits traders who already run arrows from another tool.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Ema To Sma Macd Indicator as one input. Always backtest before trading live.

Category: this is part of our Oscillators collection. Also, browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment