Clarity Markets
ENEnglish
More languages coming soon
Opens in a new tab

MACD

Moving average convergence divergence: the gap between two moving averages, with a signal line and histogram that show shifts in momentum.

What MACD is.

A line, a signal line and a histogram, drawn in a window below price.

MACD stands for moving average convergence divergence. It takes a fast moving average of price and subtracts a slow one. The result is the MACD line.

When the fast average pulls away from the slow one, the averages diverge and momentum is building. When they move back together, they converge and momentum is fading.

A second line, the signal line, is an average of the MACD line itself. The histogram shows the gap between the two lines as bars.

MACD line, signal line and histogram below price, crossing as the trend turnsPrice0MACD (12, 26, 9)MACD line, signal line and histogram below price, crossing as the trend turnsPrice0MACD (12, 26, 9)
Illustration on generated prices, not a real market. Price above, MACD (12, 26, 9) below. The navy MACD line and the orange signal line cross as each swing turns, and the histogram flips either side of zero.
TypeTrend and momentum indicator, drawn in its own window
Built fromThe 12-period and 26-period exponential moving averages of the close
Created byGerald Appel, in the late 1970s. Thomas Aspray added the histogram in 1986
Best known forSignal-line crossovers and the zero line
On MetaTrader 5Insert, then Indicators, then Oscillators, then MACD

How it is calculated.

Three lines from two averages. Your platform works them out on every new bar.

01

Work out two exponential moving averages.

One covers the last 12 closes and one the last 26. An exponential average gives the most weight to the latest prices.

02

Subtract the slow from the fast.

The 12-period average minus the 26-period average is the MACD line. It is positive when the fast average is above the slow one.

03

Average the MACD line.

A 9-period average of the MACD line gives the signal line. It is smoother than the MACD line and turns later.

04

Plot the difference as bars.

The MACD line minus the signal line is the histogram. Taller bars mean the two lines are moving further apart.

MACD line = 12-period EMA − 26-period EMA
Signal line = 9-period average of the MACD line
Histogram = MACD line − signal line

How to read it.

Four things traders watch. Each describes momentum that has already happened.

Signal-line crossovers.

When the MACD line crosses above the signal line, upward momentum is picking up. A cross below shows downward momentum gaining. Crosses are frequent, so many are noise.

The zero line.

Above zero, the 12-period average is above the 26-period average. Below zero, it is beneath it. A zero cross matches the two averages crossing on the price chart.

The histogram.

Shrinking bars show the MACD and signal lines drawing together. That often comes before a crossover, so some traders watch the bars for an earlier read.

Divergence.

Price makes a new high while MACD makes a lower high, or the reverse at lows. It suggests momentum is fading, though price can keep going.

Common mistakes.

Where traders new to MACD most often go wrong.

Acting on every crossover. In a sideways market the lines cross back and forth, and most of those crosses lead nowhere.

Forgetting that MACD lags. It is built from moving averages, so it confirms a turn after price has already moved.

Comparing MACD readings across markets. The values are in price units, so a reading on one instrument tells you little about another.

Reading MT5’s bars as the classic histogram. In MT5 the bars are the MACD line itself, not the MACD line minus the signal line.

Using MACD alone. Price levels or an indicator built a different way give fuller context.

Using it on MetaTrader 5.

MACD is one of MT5’s built-in indicators, on desktop, web and mobile. It is drawn a little differently there.

01

Open a chart.

In MetaTrader 5, open the instrument and timeframe you want to study.

02

Add the indicator.

Go to Insert, then Indicators, then Oscillators, and choose MACD.

03

Check the settings.

The defaults are Fast EMA 12, Slow EMA 26 and MACD SMA 9, applied to the close. MACD SMA is the period of the signal line.

04

Know what you are looking at.

MT5 draws the MACD line as bars and the signal line as a line. Its signal line is a simple average, not an exponential one.

 The chart on this pageMT5’s built-in MACD
MACD lineA navy lineBars
Signal lineAn orange line, an exponential averageA line, a simple average
MACD minus signalHistogram barsNot drawn

Both versions tell the same story. In MT5, a crossover is where the signal line passes through the tops of the bars.

MACD describes momentum that has already happened. It does not predict what price will do next. Practise on the free demo first, and use risk management, such as a stop-loss, on every live trade. This guide is for education only and is not investment advice.

Questions, answered.

What traders ask most about MACD.

01Who created MACD?
Gerald Appel developed MACD in the late 1970s. Thomas Aspray added the histogram in 1986.
02Why does MACD look different in MT5?
MT5’s built-in version draws the MACD line as bars and uses a simple average for the signal line. The idea is the same, only the drawing differs.
03What do the 12, 26 and 9 mean?
They are the periods of the fast average, the slow average and the signal line. They are the classic settings and the MT5 defaults.
04Is MACD a leading or a lagging indicator?
It lags, because it is built from moving averages. The histogram can shrink before a crossover, but it still follows price.
05Can I practise with it first?
Yes. The free MT5 demo has MACD and live prices, with practice money instead of yours.

Practise it on a demo.

Add MACD to a chart on a free MT5 demo and watch its crossovers against price before you trade with real money.

Trading CFDs on a live account puts your capital at risk and you can lose money. A demo does not.

CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 80% of retail investor accounts lose money when trading CFDs.