WhitmanTrading

EMA vs MACD

An exponential moving average smooths price into one line on the chart. MACD subtracts the 26-day exponential average from the 12-day one and plots that gap in its own panel, with a 9-day average of it as a signal line. So MACD is built from the averages; its zero line is exactly where the two cross.

These are compared as if they were rivals. One is a component of the other: the MACD line is literally one exponential moving average minus another. That has two measurable consequences on the S&P 500, one about timing and one about scale, and both are below.

What each one is

An exponential moving average smooths closes into one line on the price chart, weighting each new close by 2 divided by (length + 1) and starting from a simple average of the first closes. The exponential moving average covers the calculation.

MACD, from Gerald Appel, is the 12-day exponential average minus the 26-day one, plotted in a panel below price, with a 9-day exponential average of that difference as the signal line. MACD covers it.

So the averages are the input and MACD is the output. Nothing in the MACD line comes from anywhere other than the two averages.

Where they differ

Where each is drawn. The averages sit on the price chart, so price’s distance from them is visible. MACD sits in its own panel, where only the gap between the averages is shown.

What units each uses. An average is in price. MACD is a difference of two prices, so it is in points, which makes a reading from one decade or one instrument hard to compare with another.

What the signal line adds. It is a third average, of the MACD line itself, and its crosses come more often than the zero-line crosses.

Both read the same closes, and neither adds information the other lacks; they show it differently. The averages show more than the gap does, while MACD shows the gap more clearly than either average.

What they do not differ on. The MACD zero line and the crossing of the 12- and 26-day averages are the same event, as the count below confirms.

Which one to use: EMA or MACD?

Use the two averages on the price chart when you want trend and price in one picture. You see where price is, not just the gap between two smoothings.

Use MACD when you want the gap tracked as a number, for example to watch whether it is widening or narrowing, which is hard to judge by eye on a price chart.

Use the percentage form when comparing periods or instruments. Divide MACD by the 26-day average; otherwise a reading of 10 means something different at every price level.

And when MACD and a 12/26 average cross agree, count one signal, not two. They are the same calculation.

The same crossing, counted twice

The test. Every S&P 500 close from the index’s first day in 500-stock form, 4 March 1957, until 2 October 2026. Each average is seeded with a plain mean of its opening closes, and counting begins on 2 January 1958, once every line has had months to settle.

All 549 zero-line crosses were average crosses. The MACD line changed sign 549 times, and the 12-day average crossed the 26-day average 549 times, on exactly the same sessions. That is 7.99 a year.

The signal line and price came more often. MACD crossed its signal line 1,358 times (19.75 a year). The close crossed the 26-day average 1,815 times (26.40 a year) and the 12-day average 2,610 times (37.97 a year).

The signal cross usually came first. Before each zero-line cross, the most recent signal cross in the same direction came a median 6 sessions earlier (mean 8.2), with a signal cross on the same session counted as 0. Between consecutive zero-line crosses there was a median of one signal cross, as many as 23, and none in 104 of the 548 intervals.

Why MACD’s numbers grow with the index

MACD is in points, so its size follows the price level. The median size of the MACD line, ignoring sign, rose from 0.467 points in the 1960s to 39.93 in the 2020s, while the median close went from about 82 to about 4,480. In between, the decade medians were 0.740, 1.33, 3.02, 8.68 and 12.18 points.

As a share of the 26-day average it hardly moved. The same median was 0.60% in the 1960s, 0.75% in the 1970s and 1980s, 0.59% in the 1990s, 0.73% in the 2000s, 0.64% in the 2010s and 0.89% in the 2020s.

Horizontal bars of the median size of the S&P 500 MACD line by decade, from 0.467 points in the 1960s to 39.93 points in the 2020s, each labeled with the same median as a share of the 26-day average, between 0.59% and 0.89%.
Median size of the MACD (12, 26) line on the S&P 500 by decade, in index points, with the same median as a share of the 26-day exponential average, 1960 to 2026. Source: Yahoo Finance, S&P 500 index daily closes (m74-sp500-macd-12-26-9-and-ema-crosses-daily-1958-2026.csv).

The largest reading both ways was 23 March 2020, at -237.02 points, or -8.52% of the 26-day average. A fixed MACD threshold in points set in the 1990s is exceeded far more often today than the same threshold set in percent.

The original data

The sample. ^GSPC closing values from Yahoo Finance, no dividends, over that span, counted from 2 January 1958 after a ten-month warm-up. Averages: StockCharts’ method, multiplier 2 / (length + 1), the first value a simple average of the first closes; the signal line starts from the simple average of the first 9 MACD values. A cross is a session on the other side of zero, the signal line or the average from the session before.

The headline figure. 549 of 549 zero-line crosses, 100%, fell on a 12/26 average cross, while signal-line crosses came at 19.75 a year.

The file. Every session’s averages, MACD, signal, MACD as a share of the 26-day average and each kind of cross are in the S&P 500 MACD file.

What it does not show. Whether any cross was followed by a rise or fall, or any trading result. The awesome oscillator vs MACD page counts MACD crosses on SPY over a shorter span.

When it fails

The failure is counting MACD and the average cross as two votes. The 12-day average crosses above the 26-day one and MACD crosses above zero on the same bar, and the trader sizes up because two indicators agree. They agree on every one of the 549 sessions measured here, by construction, so the second vote carried no information. Any confidence it added was taken from arithmetic, not from the market.

The second failure is a fixed MACD level in points. It means something different at every price.

A third is reading the signal cross as independent. It is a smoothing of the same gap.

A fourth is comparing MACD readings across instruments without converting them to percent.

And a fifth is tuning the three lengths after each loss. The record never settles on one indicator.

The exponential moving average covers the line MACD is built from. MACD covers the indicator itself. And MACD crossover covers the signal most people trade from it.

The practical check

Decide which picture you want before adding either. If the question is where price sits against its trend, the averages on the chart answer it; if it is whether the gap between two averages is widening, MACD answers that, and adding both answers one question twice.

— Michael Whitman

This page is educational, not financial advice. Test every idea on your own charts before risking money.