TMA MACD Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

A triangular moving average is an average of an average, so it barely jitters. The TMA MACD indicator smooths price that way first, then runs a standard 12, 26 and 9 MACD on the smoothed line. The crosses come later than usual, but far fewer of them are noise.

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: TMA-MACD, Signal, Histogram, Buy, Sell
Alerts popup, push notification, email, sound
Inputs 11

What the build actually draws

Two lines, a histogram and two marks in a pane.

`TMA-MACD` traces dodger blue at width 2.

`Signal` traces orange red at width 1.

`Histogram` fills silver around zero.

`Buy` prints lime just under the line.

`Sell` prints red just over it.

  • TMA-MACD: line, dodger blue, width 2
  • Signal: line, orange red, width 1
  • Histogram: histogram, silver
  • Buy: arrow, lime, width 2, arrow code 233
  • Sell: arrow, red, width 2, arrow code 234
tma macd indicator: Triangular-average MACD with its crosses, EURUSD H1.
Triangular-average MACD with its crosses, EURUSD H1.

How a value appears

The triangular average

`TmaPeriod` `20` takes a simple average of closes, then a simple average of that. The result is a very smooth line.

The MACD

`FastPeriod` `12` and `SlowPeriod` `26` exponential averages run on the TMA. Their gap is the blue line.

The signal

`SignalPeriod` `9` smooths the gap into the orange line. A cross up prints a buy; a cross down prints a sell.

Reading the plots

Blue above orange means upward pace.

The histogram shows the gap from zero.

Crosses are slower than a plain MACD.

Marks never appear on the forming bar.

`ArrowGap` `0.15` places marks near the line.

Warm-up needs about seventy bars.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

Signal-line crosses report as BUY or SELL with a short note. `EnableAlerts` controls them, and only the popup is active at the start.

Every TMA MACD Indicator input

Core settings

Setting What it does Default
TmaPeriod Triangular MA length (double-smoothed). Triangular smoothing length, `20`. 20
FastPeriod Fast EMA on the TMA. Fast average on the TMA, `12`. 12
SlowPeriod Slow EMA on the TMA. Slow average on the TMA, `26`. 26
SignalPeriod Signal EMA on the MACD line. Signal smoothing, `9`. 9

Display settings

Setting What it does Default
ArrowGap Arrow offset (fraction of MACD range). Mark gap as a share of the MACD range, `0.15`. 0.15

Alert settings

Setting What it does Default
EnableAlerts Switch for cross messages, `true`. on
EnablePopup Popup, `true`. on
EnablePushNotify Phone route, `false`. off
EnableEmail Email route, `false`. off
EnableSound Speaker, `false`. off
SoundFile (see inputs panel) alert.wav
tma macd indicator: Inputs panel, TMA length above the MACD lengths.
Inputs panel, TMA length above the MACD lengths.

Markets that suit it

Double smoothing suits charts where plain MACD crosses too often. EURUSD H1 is the reference chart, with a cross every day or two. On M5 it calms a noisy chart. On D1 crosses are rare and late.

What to watch out for

The extra smoothing adds lag to every cross.

Crosses near zero are the weakest.

Flat markets still produce some whipsaws.

Messages start as popups and nothing more.

Copy the compiled TMA 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 TMA MACD Indicator for MT4 and MT5

The zip holds the compiled TMA 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

What does TmaPeriod 20 do before the MACD runs?

It averages closes over twenty bars, then averages that result again. The MACD then measures a line that has already lost most short-term noise, which is why its crosses are calmer.

How is TMA-MACD different from a plain MACD?

Same arithmetic, different input. A plain MACD reads raw closes; this one reads the triangular average, so its crosses arrive later and far less often in choppy sessions.

Which TMA-MACD move counts as a Buy cross?

The closed bar where the blue line moves from at or below the orange signal to above it. The forming bar is never marked, so a cross must survive the close to print.

Can SignalPeriod be shortened for earlier crosses?

Yes. A shorter signal follows the blue line more closely and crosses sooner. The cost is more whipsaws when the market goes flat, so test it before relying on it.

Are results guaranteed?

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

Category: this is part of our Oscillators collection. 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