Macd Colored Histogram Indicator: Four Column Colours

Written by Dominic Walsh · Published · Last updated

The macd colored histogram indicator answers two questions with one column. Which side of zero is it on, and is it still growing? Four colours cover the combinations, so a fading move looks different from a building one.

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: StrongBull, WeakBull, StrongBear, WeakBear, Signal, MACD
Alerts popup
Inputs 7

What the Macd Colored Histogram Indicator draws on the chart

`StrongBull` fills lime when the value is positive and rising.

`WeakBull` fills sea green when it is positive but shrinking.

`StrongBear` fills red and `WeakBear` fills tomato on the other side.

A gold `Signal` line and a dodger blue `MACD` line run over the columns.

  • StrongBull: histogram, lime, width 3
  • WeakBull: histogram, sea green, width 3
  • StrongBear: histogram, red, width 3
  • WeakBear: histogram, tomato, width 3
  • Signal: line, gold, width 1
  • MACD: line, dodger blue, width 1
Macd colored histogram indicator four-colour columns and lines on EURUSD H1.
Macd colored histogram indicator four-colour columns and lines on EURUSD H1.

How the Macd Colored Histogram Indicator calculates its values

Standard values underneath

The terminal supplies the values at `FastEMA` `12`, `SlowEMA` `26` and `SignalSMA` `9`, reading `AppliedPrice` `PRICE_CLOSE`. Both lines get plotted alongside the columns rather than hidden.

Two tests choose the colour

The first asks which side of zero the value sits on. The second compares it against the previous bar. Combining them gives the four classes, and the value itself never changes.

Alerts watch the strong states

`AlertOnBullStrong` `true` and `AlertOnBearStrong` `true` fire when the colour enters one of the two strong classes. The weak classes stay silent, which keeps the messages to real momentum shifts.

How to read the signals

A shift from lime to sea green means the move is losing steam without turning.

That early warning is the whole reason for four colours rather than two.

The two lines let you check the columns against their source.

Zero remains the level where the two lines meet.

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

One route exists here. `EnableAlerts` arrives true, with `AlertOnBullStrong` and `AlertOnBearStrong` deciding which transitions report. There is no handset option, no mail option and no clip option in this build.

Every Macd Colored Histogram Indicator input

Core settings

Setting What it does Default
FastEMA Fast EMA period. Shorter average inside the calculation, default `12`. 12
SlowEMA Slow EMA period. Longer average inside the calculation, default `26`. 26
SignalSMA Signal SMA period. Length of the average drawn off the main line, default `9`. 9
AppliedPrice Applied price. Price the study reads, default `PRICE_CLOSE`. PRICE_CLOSE

Alert settings

Setting What it does Default
EnableAlerts Alert on color transition. Parent toggle for the colour alerts, default `true`. on
AlertOnBullStrong Alert when entering Strong Bull. Report entry into the strong bull class, default `true`. on
AlertOnBearStrong Alert when entering Strong Bear. Report entry into the strong bear class, default `true`. on
Macd colored histogram indicator inputs panel with FastEMA, SlowEMA and AlertOnBullStrong.
Macd colored histogram indicator inputs panel with FastEMA, SlowEMA and AlertOnBullStrong.

Settings that fit your chart

Four classes need bars with enough movement to change class. EURUSD H1 is the reference chart, where the colour shifts a few times a day. On M5 it changes constantly. Daily bars make each shift meaningful.

When the Macd Colored Histogram Indicator fails

A colour change can happen while the value is still large, which looks alarming and often is not.

The classes come from one bar of comparison, so a single pause flips them.

Only a terminal message ships, with no handset or mail option.

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

The zip holds the compiled Macd Colored Histogram 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 StrongBull from WeakBull?

Direction of change. Both are positive, but strong means the value grew against the previous bar while weak means it shrank. That difference is the early warning a two-colour histogram cannot give you.

Why do AlertOnBullStrong and its opposite exist separately?

So you can watch one side only. A trader working long setups can leave the bear alert off and still get told when upward momentum genuinely builds, without messages from the other direction.

Does plotting the MACD line add anything?

It lets you check the columns against their source. Column height is the gap between the two lines, so seeing both makes it obvious whether a colour change came from convergence or from a real turn.

Can StrongBull change while columns stay tall?

Yes, and that is the point. A tall column shifting from lime to sea green says the move is still large but no longer growing, which usually arrives well before the value approaches zero.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Macd Colored Histogram 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