Developed by Gerald Appel in the late seventies, the Moving Average Convergence/Divergence oscillator (MACD) is one of the simplest and most effective momentum indicators available.
The MACD turns two trend-following indicators, moving averages, into a momentum oscillator by subtracting the longer moving average from the shorter one.
The MACD indicator is made up of three components:
MACD Line = (12-period EMA – 26-period EMA)
Signal line = 9-period EMA
Histogram = MACD Line – Signal Line
An approximated MACD can be calculated by subtracting the value of a 26 period Exponential Moving Average (EMA) from a 12 period EMA.
The shorter EMA is constantly converging toward, and diverging away from, the longer EMA.
This causes MACD to oscillate around zero levels. A signal line is created with a 9 period EMA of the MACD line.