WhitmanTrading

What Is MACD?

Moving average convergence divergence (MACD) is the distance between a twelve-period and a twenty-six-period exponential moving average, drawn as a line. A nine-period average of that line is the signal line, and the histogram is the gap between the two. It is a trend-following tool built entirely from moving averages.

What Is MACD? — illustrated on a chart Watch: MACD Signals for Beginners (Complete Guide)

Covered on this page: TradingView.

Moving average convergence divergence (MACD) looks more sophisticated than it is. Underneath the panel and the three components there is one subtraction, and knowing that changes what you should reasonably expect from it.

How it works

MACD is the distance between two exponential moving averages.

Take the twelve-period average and subtract the twenty-six-period one. When the fast average is above the slow one the result is positive; when it is below, negative. Plot that number and you have the MACD line.

Two more pieces sit on top of it. The signal line is a nine-period average of the MACD line — an average of an average. The histogram is the gap between those two.

So all three components come from the same subtraction. Nothing on this panel knows anything the two moving averages did not.

The zero line

MACD equals zero when the two averages are equal. Above zero, the fast average is above the slow one; below zero, beneath it.

This makes the zero line the more meaningful of the two crossings on the panel, and it is discussed far less than the signal cross.

The histogram

The histogram is not volume and it is not strength. It is the vertical distance between the MACD line and its signal line, drawn as bars.

Tall bars mean the two lines are far apart, which means the fast average is pulling away from the slow one — the averages are separating quickly. Shrinking bars mean they are converging, which usually happens before a crossover for the simple reason that a crossover is what happens when the gap reaches zero.

What 12, 26 and 9 actually change

Three inputs, and each one does something you can state plainly.

The fast length (12) sets how quickly the line reacts. Lower it and the line becomes jumpier and crosses more often.

The slow length (26) sets the baseline it is measured against. Raising it makes the line slower and the zero crossings rarer.

The signal length (9) only smooths the line that already exists — it changes when crossovers happen and nothing about the market being measured.

Two of the three change what is measured. The third changes only when you are told about it. More crossings is not more information, which is the thing to hold onto before tuning any of them.

The crossover, honestly

Here are the actual numbers. The low was 98.26 and the eventual high was 103.55. The cross fired with price at 100.42.

So the signal arrived after part of the move — and left 59% of it still ahead. That is a perfectly respectable result for a lagging indicator, and it is worth saying rather than repeating the usual line that crossovers are hopeless.

The problem is not the trending case. It is the ranging one.

A worked example

Read the trend chart forward, using the panel as a filter.

The falling stretch. MACD is below zero and below its signal. The fast average is under the slow one and falling away from it. The useful conclusion is negative: not a place to look for longs.

The base. The line drifts back toward zero and the histogram bars shrink to almost nothing. This is the reading that matters most and gets taught least — a MACD line pinned to zero means the two averages are on top of each other, which means there is no trend at all.

The zero cross. The fast average moves above the slow one. The character of the chart has changed before any signal-line crossover has happened.

The signal cross. Now the classic entry fires, with the move already partly underway.

The panel told you the market was trending. The chart told you where to act. Those are two different jobs and the indicator only does the first.

The original data

Across our study of 24,971 trading videos, 471 have MACD or moving average convergence divergence in the title. The median one gets 3,645 views, 80% never pass 50,000, and the median length is 8.8 minutes.

That is among the lowest medians of any topic in this glossary — below moving averages at 4,916, Relative strength index (RSI) at 5,377 and support and resistance at 20,327, and beaten only by a handful of much smaller fields.

The likeliest reading is saturation rather than disinterest: 471 videos on a forty-year-old indicator whose explanation does not change. There is no new thing to say about the calculation, so the videos are near-identical and the audience is split hundreds of ways.

The corpus carries description text for 110 of those 471, and across those 110, 5 mention invalidation, failure, or what a bad read looks like.

How this connects

Two moving averages subtracted, then averaged again. That is the whole construction, which means every criticism of a moving average applies here twice.

Its output is in price units, which is why the percentage price oscillator exists - dividing by the slow average makes readings comparable across instruments.

The histogram is the gap between the line and its signal, so it is a rate-of-change reading rather than an independent third thing.

It shares its input with RSI and almost everything else, so agreement between them is arithmetic rather than confirmation.

And market structure is the honest alternative for the job most people use it for - deciding whether a trend exists - because structure reads the bars rather than a smoothed summary of them.

When it fails

This is the failure. MACD is built from moving averages, and moving averages have nothing to say about a market that is not trending. In a range the line sits on zero and crosses its signal repeatedly — five times across one such stretch.

Every one of those is a signal by the standard interpretation, and none of them led anywhere.

Divergence that does not resolve

Price making a higher high while the MACD line makes a distinctly lower high.
Price higher, MACD lower. A real divergence in the numbers. Illustrative chart - not real market data.

The divergence above is genuine — price made a higher high and the MACD line did not. It is a true statement that the second push was weaker than the first.

It is still not a reason to be short. Weaker is not the same as finished, and the same picture appears on plenty of charts that carry on upward. See RSI for the same problem in more detail, with a chart of it failing.

You are reading it as its own thing

Every reading on the panel is a restatement of where two averages are. If the averages are not telling you anything, neither is the panel, no matter how elaborate it looks.

You found the settings afterwards

Twelve, twenty-six and nine are conventions from before personal computers. They are not optimal and they are not magic — and any three numbers can be tuned to have caught the moves on a chart you have already seen.

Moving averages are what MACD is made of, and the page covers the lag that explains every one of its shortcomings.

RSI is the other oscillator worth knowing, and it fails in a different and instructive way.

And market structure supplies what no oscillator can: the specific price at which your read is finished.

What I actually do

This sits in the same bucket for me as every other indicator: context, not a trigger. It is two averages subtracted, so it can only tell you what the averages already told you, slightly later. Where I find it genuinely useful is as a quick read on whether a market is trending at all, because a line hugging zero and crossing back and forth is not a market for trend setups.

— Michael Whitman

This page is educational, not financial advice. Test every idea on your own charts before risking money. Some links on this page earn a commission if you buy through them. It costs you nothing and it does not decide what appears here or in what order — how these pages are made is set out in our methodology.