MACD indicator explained: how to read it

By Oalgo · Last reviewed

The MACD indicator (Moving Average Convergence Divergence) is the gap between a fast moving average and a slow one. The usual settings are a 12-period and a 26-period EMA, plus a 9-period average of that gap.

Chart: example prices with MACD below them: the MACD line, its 9-period average line, and the histogram, which is the gap between the two lines.PriceMACD lineAverage lineHistogram0
Example prices, made up for this page. Settings 12, 26 and 9.

How is MACD calculated?

#
  • Take two exponential moving averages (EMAs) of the close: a fast one over 12 candles and a slow one over 26.
  • MACD line = fast EMA − slow EMA.
  • Average line = a 9-period EMA of the MACD line.
  • Histogram = MACD line − average line.

How do you read MACD?

#
What you seeWhat it suggests
MACD line above zeroThe fast EMA is above the slow EMA. Recent prices are higher than the longer average.
MACD line below zeroThe fast EMA is below the slow EMA. Recent prices are lower than the longer average.
MACD line crosses above the average lineMomentum has turned up. The histogram moves from below zero to above it.
MACD line crosses below the average lineMomentum has turned down. The histogram moves from above zero to below it.

MACD is built from moving averages, so it follows price instead of leading it. In a sideways market the two lines cross back and forth, and most of those crosses lead nowhere.

How do people use MACD in rules?

#
  • The MACD line crossing above or below the average line.
  • The MACD line crossing above or below zero.
  • The histogram changing from negative to positive, or the other way round.
  • MACD next to a second indicator, such as RSI, so that two conditions must agree.

What can MACD not tell you?

#

MACD does not say how far a move will go. A cross often comes after part of the move has already happened, and a cross does not promise that price will keep going. Test any rule on past prices with a backtest, then forward test it.

In Oalgo you can tell Oalgo AI your MACD rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.

Read next