The MACD formula, in plain English
Explain how MACD is built from three moving averages and what each line represents.
Lesson path
Technical Analysis + Price Action
MACD
Pass the check before saving this lesson.
Pass the check to unlock nextOpen track mapChange starting pointToday's tiny win: make one idea click.
Explain how MACD is built from three moving averages and what each line represents.
MACD without the mystery
MACD stands for Moving Average Convergence Divergence. The name is a mouthful, but the math is simple. There are only three pieces, and once you see how they fit together, the indicator stops feeling like a black box. The MACD line is the engine. It is the 12-period EMA of close prices minus the 26-period EMA of close prices. When the 12 is above the 26, MACD is positive. When the 12 is below the 26, MACD is negative. The further apart the two EMAs are, the bigger the MACD value gets.
The signal line is the smoother on top. It is a 9-period EMA calculated on the MACD line itself. Because it averages the last nine values of MACD, it always lags a step or two behind. When MACD rises sharply, the signal line follows more slowly. That delay is exactly what creates the crossover signals you will study later in this chapter.
The histogram is the visual difference between the two lines. Histogram value = MACD line minus signal line. When MACD is above the signal, the histogram bars sit above zero. When MACD is below the signal, the bars sit below zero. The bars grow taller as the two lines spread apart and shrink as they converge. That is why a fading histogram is often the first hint that a cross is coming.
The default settings are 12, 26, and 9. The 12 is the fast EMA. The 26 is the slow EMA. The 9 is the signal smoothing. These three numbers were picked by Gerald Appel decades ago for daily charts. They became the de facto standard. You will see them on almost every charting platform on earth. Later in this chapter you will see how traders sometimes tweak them — but starting with the defaults is the right move.
Recap: MACD line = 12 EMA minus 26 EMA of close. Signal line = 9 EMA of the MACD line. Histogram = MACD minus signal. Three pieces, one machine.
Knowledge check
Answer before moving on.
1. What exactly is the MACD line equal to on a chart using default settings?
2. The histogram on a MACD panel represents what specifically?
Pass the check before saving.
Use the knowledge check first. After you pass it, this card turns into the save-and-continue handoff.