MACD 4Color Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

One colour answers one question. The macd 4color indicator asks two at once, which is why it needs four. Each column takes its shade from which side of zero it sits on and from whether it grew against the previous bar, and both lines stay drawn underneath.

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 6: Hist Rising Above, Hist Falling Above, Hist Falling Below, Hist Rising Below, MACD, Signal
Alerts popup, push notification, email, sound
Inputs 10

Chart elements

Four histograms and two lines, in a pane.

`Hist Rising Above` fills lime at width 2.

`Hist Falling Above` fills green beside it.

`Hist Falling Below` fills red.

`Hist Rising Below` fills maroon.

`MACD` traces dodger blue and `Signal` orange.

  • Hist Rising Above: histogram, lime, width 2
  • Hist Falling Above: histogram, green, width 2
  • Hist Falling Below: histogram, red, width 2
  • Hist Rising Below: histogram, maroon, width 2
  • MACD: line, dodger blue, width 2
  • Signal: line, orange, width 2
macd 4color indicator: The four-shade histogram with both lines, EURUSD H1.
The four-shade histogram with both lines, EURUSD H1.

How it builds its numbers

The gap itself

`FastPeriod` `12` less `SlowPeriod` `26` gives the main line, `SignalPeriod` `9` smooths it, and the histogram is the distance between those two.

The first question

Which side of zero the column sits on. Above means the main line leads its signal; below means the signal leads. That decides the warm or cool family.

The second question

Whether this column beats the previous one. Growing takes the brighter shade in its family, shrinking takes the darker one, which reads as momentum easing.

Turning output into a view

Lime is strongest: above zero and growing.

Green is above zero but shrinking.

Red is below zero and growing downward.

Maroon is below zero but recovering.

Green and maroon usually arrive before a crossing.

Both lines stay drawn for context.

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

The two lines crossing is what reports, rather than a shade change. `EnableAlerts` governs it and the terminal shows a dialog already, with the mobile, mail and desktop file behind `SoundFile` all closed.

Every Macd 4Color Indicator input

Core settings

Setting What it does Default
FastPeriod Quicker of the two averages, `12`. 12
SlowPeriod The slower one, `26`. 26
SignalPeriod Length that smooths their gap, `9`. 9
AppliedPrice Price feeding both averages, `PRICE_CLOSE`. PRICE_CLOSE

Alert settings

Setting What it does Default
EnableAlerts Whether a line crossing speaks, `true`. on
EnablePopup The terminal shows a dialog, `true`. on
EnablePushNotify A mobile device is told too, `false`. off
EnableEmail The message leaves as mail, `false`. off
EnableSound The desktop plays a file, `false`. off
SoundFile Which file that is, `”alert.wav”`. alert.wav
macd 4color indicator: Inputs panel, the three periods above the price setting.
Inputs panel, the three periods above the price setting.

Getting the chart right

Appel’s periods came from daily bars and still set the pace here. EURUSD H1 is the reference chart, where the shade changes several times a day. On M5 the colours flicker. On D1 a single shade can hold for weeks.

When the Macd 4Color Indicator fails

Four shades take practice to read at speed.

The darker shades change on the smallest movement.

Three stacked averages lag whatever they measure.

Column heights compare badly between symbols.

Copy the compiled Macd 4Color 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 Macd 4Color Indicator for MT4 and MT5

The zip holds the compiled Macd 4Color 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 separates Hist Rising Above from Hist Falling Above?

Only the slope. Each sits over the reference, so each says the main line has the lead. Lime means the gap widened against the previous bar and green means it narrowed, warning of a turn.

What does a Hist Rising Below column show?

The histogram is under zero but shorter than the previous column. The signal still has the lead, yet the gap is closing, which typically shows up before a crossing back the other way.

Why does EnableAlerts watch the crossing, not colour?

Because shades change constantly. The histogram reverses slope on almost any bar, whereas the two lines crossing is a genuine change of state and happens rarely enough to deserve a message.

Does AppliedPrice PRICE_CLOSE affect the shading?

Indirectly. It decides which price feeds both averages, so changing it moves the whole calculation and therefore every column. The four-way shading rule itself stays exactly as it was.

Are results guaranteed?

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

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