# MACD

> MACD tracks the gap between two EMAs to show trend and momentum. Learn the MACD line, signal line and histogram, crossovers, divergence and common pitfalls.

Source: https://learn.tradelabsai.com/indicators/macd/  
Track: Indicators · Level: Beginner · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "MACD", https://learn.tradelabsai.com/indicators/macd/

MACD, short for Moving Average Convergence Divergence, is a trend and momentum indicator built from two exponential moving averages. Gerald Appel developed it in the late 1970s, and Thomas Aspray added the histogram in 1986. MACD shows whether short term momentum is stronger or weaker than longer term momentum, and how that relationship is changing.

## The three parts

```
MACD line = EMA(12) − EMA(26)
Signal line = EMA(9) of the MACD line
Histogram = MACD line − Signal line
```

| Part | What it shows |
|---|---|
| MACD line | Positive when the 12 period EMA is above the 26: short term momentum stronger than longer term |
| Signal line | A smoothed version of the MACD line, used for crossovers |
| Histogram | The gap between MACD and signal; growing bars mean momentum accelerating, shrinking bars mean it is fading |
| Zero line | Where the two EMAs are equal |

The default settings are 12, 26 and 9, from Appel's original work.

## Main signals

### Signal line crossovers

- **Bullish:** MACD crosses above the signal line.
- **Bearish:** MACD crosses below the signal line.

These are the most common signals and also the most frequent false signals in sideways markets.

### Zero line crossovers

MACD crossing above zero means the 12 period EMA has crossed above the 26: a slower, more significant trend signal. Crossing below zero is the bearish version.

### Histogram changes

The histogram often turns before the crossover. Shrinking bars warn that momentum is fading, giving an early hint that a crossover may follow.

**Example: A momentum shift**
A stock has been falling, with MACD below zero and negative histogram bars. The bars start shrinking for four days while price makes a final low. Then MACD crosses above its signal line, still below zero. Two weeks later MACD crosses above zero as the stock establishes an uptrend. The histogram gave the earliest warning, the signal crossover the trigger, and the zero cross the trend confirmation.

## Divergence

- **Bearish divergence:** price makes a higher high while MACD makes a lower high.
- **Bullish divergence:** price makes a lower low while MACD makes a higher low.

As with RSI, divergence shows weakening momentum, not a guaranteed reversal. It is most useful at key levels and combined with structure. See [RSI (Relative Strength Index)](https://learn.tradelabsai.com/indicators/rsi/).

## Trading with MACD

1. **Trend filter:** favour long trades when MACD is above zero and short trades when below.
2. **Entry timing:** within the trend direction, use signal line crossovers after pullbacks.
3. **Exit warnings:** shrinking histogram bars or divergence can prompt tightening stops.
4. **Combine with structure:** a bullish crossover at support after a pullback is stronger than one in the middle of a range.

## MACD limitations

- **Lag:** it is built from moving averages, so signals come after moves begin.
- **Not bounded:** unlike RSI, MACD has no fixed range, so "overbought" levels differ by market and price.
- **Whipsaws:** in ranges, crossovers flip back and forth.
- **Comparing markets:** MACD values depend on price level, so a reading of 2 means different things for a $20 stock and a $2,000 stock.

## Settings

The 12, 26, 9 default is standard. Some traders use faster settings such as 5, 35, 5 for quicker signals, or adapt to their timeframe. Test any change on data you did not use to choose it. See [Overfitting and Curve Fitting](https://learn.tradelabsai.com/research/overfitting-and-curve-fitting/).

## Common mistakes

- **Taking every crossover** in sideways markets.
- **Ignoring the zero line** and trend context.
- **Treating divergence as a trigger.**

For a simpler momentum measure that compares today's price with a past price, see [Rate of Change and Momentum](https://learn.tradelabsai.com/indicators/rate-of-change-and-momentum/).

## Frequently asked questions

### What does MACD stand for?

Moving Average Convergence Divergence: it tracks how two exponential moving averages move towards and away from each other.

### What is a MACD crossover?

When the MACD line crosses its signal line. Crossing above is considered bullish, crossing below bearish.

### Is MACD better than RSI?

They measure momentum differently. MACD is better at showing trend direction and changes; RSI is better at showing overbought and oversold extremes. Many traders use both.

## Sources

- Wikipedia, [MACD](https://en.wikipedia.org/wiki/MACD)

## Continue learning

- Next lesson: [Stochastic Oscillator](https://learn.tradelabsai.com/indicators/stochastic-oscillator/)
- Previous lesson: [RSI (Relative Strength Index)](https://learn.tradelabsai.com/indicators/rsi/)
- Related: [RSI (Relative Strength Index)](https://learn.tradelabsai.com/indicators/rsi/): The RSI measures the speed and size of recent price moves on a 0 to 100 scale. Learn the formula, overbought and oversold levels, divergence and how to trade it.
- Related: [Exponential Moving Average (EMA)](https://learn.tradelabsai.com/indicators/exponential-moving-average/): The EMA weights recent prices more heavily, so it reacts faster than an SMA. Learn the EMA formula, the smoothing factor, popular settings and how traders use it.
- Related: [Moving Averages Explained](https://learn.tradelabsai.com/indicators/moving-averages-explained/): Moving averages smooth price to show the trend. Learn SMA vs EMA, popular settings like the 20, 50 and 200 day, crossovers, dynamic support and common mistakes.
- Related: [Trend Following](https://learn.tradelabsai.com/strategies/trend-following/): Trend following buys markets that are rising and sells those that are falling. Learn the rules, the evidence, typical results and why patience pays.
- Related: [Momentum Trading](https://learn.tradelabsai.com/strategies/momentum-trading/): Momentum trading buys assets that are rising fastest and sells those falling fastest. Learn the research, intraday and multi month methods and momentum crashes.
- Related: [Volume Divergence](https://learn.tradelabsai.com/volume/volume-divergence/): Volume divergence is when price makes new highs or lows on shrinking volume. Learn how to spot bearish and bullish volume divergence and how to act on it.
