Trading AI
What is the MACD?
Last updated: 27 August 2026
The MACD, or moving average convergence divergence, compares two exponential moving averages of price and shows the gap between them. That gap widens when a move is accelerating and narrows when it is running out of fuel. It is not a measure of price, it is a measure of the change in price, and almost every mistake made with it comes from forgetting that.
What the three parts actually are
The standard settings are 12, 26 and 9, and each number does something different.
- The MACD line. The 12 period exponential moving average minus the 26 period one. When the fast average is above the slow one, the line is above zero.
- The signal line. A 9 period exponential moving average of the MACD line itself. It is a smoothed version of the first line, so it always lags it.
- The histogram. The MACD line minus the signal line, drawn as bars. It is the distance between the two lines, and it is the part that moves first.
The zero line matters more than most people think. Above zero, the shorter average is above the longer one, so recent momentum has had the upper hand on that timeframe. Below zero it is the other way round. That is not the same as a trend: a market making lower highs can hold the MACD above zero for the length of a bounce. A crossover above zero and a crossover below zero are not the same event.
Why a crossover is not a signal
The MACD line crossing its signal line is the most quoted MACD event and the least useful on its own. It is arithmetic: the moment the recent average of the gap catches up with the gap. On a chart that goes sideways, it happens every few candles, in both directions, and every one of them is noise.
What changes the value of a crossover is where it happens. A cross back above zero after a pullback, at a level that already mattered, is a very different situation from a cross in the middle of a range. The indicator does not know the difference. You do, because you can see the chart.
The histogram moves before the lines
Because the histogram is the distance between the two lines, it shrinks before they touch. Bars getting shorter while price still makes new highs means the move is still going but with less force behind each step. That is early information, and it is the reason the histogram is worth more attention than the crossover it eventually produces.
It is also the easiest part to over read. A shrinking histogram does not mean price will reverse. It means the acceleration is over. A market can grind higher for a long time with a flat histogram, and plenty do.
Divergence, and what it is worth
Divergence is when price makes a higher high and the MACD does not, or a lower low and the MACD does not. It says the second move was made with less momentum than the first. That is a real observation and it is worth noticing.
It is not a reason to trade against a trend. A strong market produces divergence again and again on the way up, and each one is a losing short until the last. Divergence earns its keep when it lines up with something structural: a level that has already held, a break of structure, a liquidity sweep. Alone, it is a footnote.
The mistakes that cost the most
- Trading every crossover. On a ranging chart the MACD crosses constantly, and each cross arrives after the move it describes.
- Ignoring the zero line. A bullish cross below zero and a bullish cross above zero carry very different odds.
- Reading it without the chart. The MACD has no idea where the levels are. It only knows two averages.
- Changing the settings until it fits. Any indicator can be tuned to have called the last move. That tells you nothing about the next one.
- Stacking it with the RSI and calling it confluence. Both measure momentum from the same closes. Two views of one thing is not two signals.
Questions people ask
What are the best MACD settings?
12, 26 and 9 are the defaults, and they are the ones most traders are looking at, which is part of why they matter. Faster settings react sooner and give more false crossovers. Slower settings give fewer and later. There is no setting that removes the trade off.
Is the MACD a lagging indicator?
Yes, by construction. It is built from moving averages of past closes, so it can only describe what has already happened. The histogram lags less than the lines, and the lines lag less than a crossover, but nothing here leads price.
Does the MACD work on crypto and forex?
It works the same way anywhere, because it only reads closing prices. What changes is the market: a 24 hour market with thin weekends produces more false crossovers than a market with a session close.
MACD or RSI, which one should I use?
They read related things in different ways, and running both does not double your information. Pick the one whose behaviour you know on the markets you actually trade, and learn where it fails.
Reading momentum without adding indicators
Trading AI reads a photo or a screenshot of any chart and returns the MACD reading when the indicator panel is visible in the image, alongside the market structure, the key levels, the order blocks, the fair value gaps, the liquidity pools and a trade plan. What is not in the frame does not exist for the model, so an indicator that is not on screen cannot be read.
Momentum only means something inside a trend, and the trend is defined by structure: What is market structure?
The other momentum reading, and the one most often paired with this one: What is the RSI?
A crossover at an obvious level is a very different situation from one in open space: What are support and resistance?
This page is educational. It is not financial advice, and nothing here is a recommendation to buy or sell anything.