Back to Glossary

MACD

Indicators

Definition

Moving Average Convergence Divergence - a trend-following momentum indicator showing the relationship between two moving averages.

In Detail

MACD (Moving Average Convergence Divergence) is one of the most widely used momentum and trend-following indicators in technical analysis. It consists of three components: the MACD line (calculated by subtracting the 26-period EMA from the 12-period EMA), the signal line (a 9-period EMA of the MACD line), and the histogram (the visual representation of the difference between the MACD line and the signal line). When the 12-period EMA is above the 26-period EMA, the MACD line is positive, indicating bullish momentum. When it is below, the MACD line is negative, indicating bearish momentum. The histogram makes it easy to see momentum shifts at a glance — growing histogram bars indicate strengthening momentum, while shrinking bars indicate weakening momentum, often before the MACD and signal lines actually cross. MACD generates three types of trading signals: signal line crossovers (when the MACD line crosses above or below the signal line), zero line crossovers (when the MACD line crosses above or below zero, indicating a shift in the medium-term trend), and divergences (when the MACD direction disagrees with the price direction, suggesting a potential reversal).

How to Use in Trading

The most common MACD signal is the crossover: buy when the MACD line crosses above the signal line (especially when both are below zero, indicating a reversal from bearish to bullish territory) and sell or go short when the MACD line crosses below the signal line. Zero-line crossovers provide stronger trend confirmation — a MACD crossing above zero indicates that the 12-period trend has turned positive relative to the 26-period trend. Histogram analysis is particularly valuable for anticipating crossovers before they happen: when the histogram starts shrinking (bars getting shorter), it often precedes a crossover by several periods, giving you time to prepare your trade. MACD divergence is the indicator's most powerful signal — when price makes a new high but MACD makes a lower high, bearish momentum is building beneath the surface. Combine MACD with a trend filter: in an uptrend, only trade bullish MACD crossovers (ignore bearish ones as noise); in a downtrend, only trade bearish crossovers.

Example

A stock has been declining for two months, trading at $38 with both the MACD line and signal line well below zero. Price drops to $35 and makes a new low, but MACD makes a higher low compared to its previous trough — this is bullish divergence. Five days later, the MACD line crosses above the signal line while the histogram turns positive. You wait for additional confirmation: the MACD line then crosses above zero, confirming that the 12-period EMA has risen above the 26-period EMA. You enter long at $40 with a stop at $36 (below the recent swing low). The MACD histogram continues to expand as the stock rallies to $48 over three weeks. When the histogram begins contracting (bars shrinking), you tighten your stop. The MACD line eventually crosses below the signal line at $46 and you exit. The MACD divergence alerted you to the weakening downtrend, and the sequence of crossovers guided both your entry and exit.

Technical Analysis Basics

Go beyond the definition with our in-depth guide

Related Terms

More Indicators Terms

Put This Knowledge to Use

Practice crypto trading with $10,000 virtual capital. No risk, real market conditions.

Start Paper Trading Free