Blog/Education

MACD signal line explained with examples

How the MACD line, signal line and histogram are built, with worked numbers, what a crossover means, where MACD misleads, and how to set MACD alerts.

MACD is a trend and momentum indicator that appears on almost every charting tool, and the part people ask about most is the signal line. This guide shows how the MACD line, the signal line and the histogram are built, walks through a worked example, explains what a crossover tells you and where it misleads, and shows how to set MACD alerts.

The three parts of MACD

  • MACD line: the 12-day exponential moving average (EMA) minus the 26-day EMA.
  • Signal line: a 9-day EMA of the MACD line itself.
  • Histogram: the MACD line minus the signal line, drawn as bars.

An EMA gives more weight to recent prices, so the 12-day line reacts faster than the 26-day line. When recent prices rise, the faster line pulls ahead and the MACD line goes up. See SMA vs EMA for how the two types of average differ.

A worked example

These numbers are invented to show the arithmetic. They are not real prices.

Day12-day EMA26-day EMAMACD lineSignal lineHistogram
1103.0103.4−0.4−0.2−0.2
2103.6103.60.0−0.2+0.2
3104.5103.9+0.60.0+0.6
4105.2104.2+1.0+0.2+0.8

On day 1 the MACD line (−0.4) is below the signal line (−0.2), so the histogram is negative. On day 2 the MACD line rises to 0.0 and moves above the signal line, which is a bullish crossover. By day 4 the MACD line is well above both zero and the signal line. The signal line trails because it is an average of the MACD line.

What the signals mean

EventWhat it shows
MACD crosses above the signal lineShort-term momentum has turned up (bullish crossover)
MACD crosses below the signal lineShort-term momentum has turned down (bearish crossover)
MACD crosses above zeroThe 12-day EMA has moved above the 26-day EMA, so the trend has turned up
MACD crosses below zeroThe 12-day EMA has fallen below the 26-day EMA, so the trend has turned down
Histogram shrinkingMomentum is fading, even if the MACD line has not yet crossed

Where MACD misleads

  • It lags. It is built from averages of past prices, so it confirms moves after they begin.
  • Sideways markets. When price drifts without a trend, the lines cross back and forth and produce many false signals.
  • Different scale for different stocks. The MACD value is in price units, so you cannot compare a reading on a $20 stock with one on a $500 stock.

Some investors watch for divergence, where the price makes a new high but MACD does not, as an early sign that momentum is weakening. Divergences can also persist for a long time without a reversal.

Crossovers are a prompt, not a verdict. They are more useful when they agree with the longer trend or with a second indicator than when they stand alone.

Setting a MACD alert

A FearAlert MACD alert notifies you after a check when MACD crosses above or below its signal line, or when it moves above or below zero, for any stock or ETF. Starting points:

  • Bullish crossover on a holding: a prompt to check whether momentum is recovering after a dip.
  • Bearish crossover on a holding: a prompt to review the position.
  • Crossover plus a second condition: for example a bullish crossover with RSI below 50, set up as a compound alert (a paid feature).

Add a cooldown, since MACD in a quiet market can cross several times in a week. To compare MACD with RSI, read RSI vs MACD and RSI explained with examples.

Frequently asked questions

What is the signal line in MACD?

The signal line is a 9-day exponential moving average of the MACD line. Because it is smoother than the MACD line, the two cross when momentum changes direction.

How is MACD calculated?

Subtract the 26-day EMA from the 12-day EMA to get the MACD line. Take a 9-day EMA of that line to get the signal line. The histogram is the difference between the two.

What is a MACD crossover?

A bullish crossover is when the MACD line moves above the signal line, and a bearish crossover is when it moves below. Both describe a change in short-term momentum.

What does it mean when MACD crosses zero?

It means the 12-day EMA has crossed the 26-day EMA. Above zero, the shorter average is higher, which is consistent with an uptrend. Below zero, the reverse.

Can I set an alert for a MACD crossover?

Yes. Create a MACD alert on any stock or ETF and choose a bullish crossover, a bearish crossover, or a move above or below zero. Add a cooldown to avoid repeated alerts.

This article is educational and is not financial advice. MACD describes past prices and does not predict future ones. The worked numbers are illustrative.

Automate your stock alerts today.

1-month monitoring trial. Supports RSI, MACD, Bollinger Bands, Fear & Greed Index, and more.

Get started for free →

← Back to blog