TMA MACD Non Repaint Indicator: MACD On A Double SMA

Written by Dominic Walsh · Published · Last updated

The tma macd non repaint indicator changes what MACD reads. A triangular average replaces the raw close. That average is an average of an average, and this build keeps it trailing so no value moves forward later.

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(TMA), Signal, Histogram, Buy, Sell
Alerts popup, push notification, email, sound
Inputs 10

What the Tma macd non repaint Indicator shows

A dodger blue `MACD(TMA)` line runs in its own pane.

An orange red `Signal` line follows it at `SignalPeriod` `9`.

A slate gray `Histogram` shows the gap between the two.

`Buy` uses arrow 233 and `Sell` uses 234 at each crossing.

  • MACD(TMA): line, dodger blue, width 2
  • Signal: line, orange red, width 1
  • Histogram: histogram, slate gray, width 2
  • Buy: arrow, lime, width 2, arrow code 233
  • Sell: arrow, red, width 2, arrow code 234
Tma macd non repaint indicator lines, histogram and arrows on EURUSD H1.
Tma macd non repaint indicator lines, histogram and arrows on EURUSD H1.

How the Tma macd non repaint Indicator calculates its values

The triangular average

A simple average at `TmaPeriod` `12` runs over the close. A second simple average of the same length then runs over that result. Double smoothing gives a calmer series than a single pass.

MACD on top of it

Two exponential averages at `FastPeriod` `12` and `SlowPeriod` `26` run over the triangular series rather than price. Subtracting the slow from the fast gives the main line, and the histogram holds the gap to the signal.

Trailing on purpose

A centred triangular average would sit half its length in the past and shift as new bars arrive. This build refuses that. Every value uses bars up to and including the current one, so nothing gets rewritten.

Making the output useful

The main line reacts later than a standard MACD, because of the extra smoothing.

Zero sits in the pane as a reference the histogram crosses.

A mark lands where the main line and the signal swap places.

All averages fill buffers once, so a redraw gives the same numbers.

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

`EnableAlerts` gates every route and ships true beside `EnablePopup`. Switch `EnablePushNotify` to reach the mobile app, `EnableEmail` for mail, or `EnableSound` to play `SoundFile`. Those three start false. Crossings report once a bar has closed.

Every Tma macd non repaint Indicator input

Core settings

Setting What it does Default
TmaPeriod Triangular MA period (double SMA). Bars in each pass of the triangular average, default `12`. 12
FastPeriod Fast EMA on the TMA. Bars in the fast exponential average, default `12`. 12
SlowPeriod Slow EMA on the TMA. Bars in the slow exponential average, default `26`. 26
SignalPeriod Signal EMA on the MACD. Bars in the signal average, default `9`. 9

Alert settings

Setting What it does Default
EnableAlerts Master alert switch. Gate covering the routes below, default `true`. on
EnablePopup Popup alert. Dialog inside MetaTrader, default `true`. on
EnablePushNotify Push to mobile MetaTrader. Alert to the mobile app, default `false`. off
EnableEmail Email alert. Message to the terminal mail address, default `false`. off
EnableSound Sound alert. Plays the file named below, default `false`. off
SoundFile (see inputs panel) alert.wav
Tma macd non repaint indicator inputs panel with TmaPeriod, FastPeriod and SlowPeriod.
Tma macd non repaint indicator inputs panel with TmaPeriod, FastPeriod and SlowPeriod.

Markets and timeframes

Extra smoothing needs a chart with room. EURUSD H1 is the reference chart, where `SlowPeriod` `26` covers over a day before the triangular pass is added. On M5 the pane still moves plenty. H4 charts turn it into a slow swing tool.

When to distrust it

Three layers of averaging put every crossing well behind price.

A quiet range still produces crossings, just smaller ones.

The trailing choice costs responsiveness, which is the price of not shifting.

Copy the compiled Tma macd non repaint 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.

Background reading on the method behind the Tma macd non repaint Indicator: Economic calendar on Wikipedia, Three Line Break Charts at StockCharts ChartSchool.

Download the Tma macd non repaint Indicator for MT4 and MT5

The zip holds the compiled Tma macd non repaint 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 makes TmaPeriod 12 triangular?

Running the same simple average twice. The first pass smooths the close and the second smooths that result, which weights the middle of the window most. Twelve bars per pass is the default here.

Why does a centred TMA repaint?

Because it shifts its output back by half the window, leaving the newest bars unfinished. Those values change as bars arrive. This build only ever looks backward, so a printed value stays where it was.

How does SlowPeriod 26 differ from standard MACD?

The period matches the textbook setting, but the input does not. It averages the triangular series instead of the close. Same arithmetic, calmer source, later turns in the pane.

What does the Histogram plot show?

The distance between the main line and the signal. It crosses zero exactly when those two swap places, which is also when a mark appears. Bar height shows how far apart the pair has travelled.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Tma macd non repaint 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