The MACD (moving average convergence divergence) indicator measures the gap between a fast and a slow exponential moving average of price. Gerald Appel created it in the 1970s. It is drawn as a line, a smoothed signal line and a histogram below the chart, and traders read crosses, the zero line and divergence for the strength and direction of a trend.
In short
- MACD line = 12-period EMA minus 26-period EMA. The signal line is a 9-period EMA of the MACD line. The histogram is the gap between the two lines.
- A cross of the MACD line above the signal line is a bullish signal, and below it a bearish one. A cross of the zero line shows the fast average moving across the slow one.
- MACD lags price, because it is built from averages. It confirms a move that has begun, and it does not predict one.
- It works better in trends than in ranges, where its crosses come often and mostly lose.
- On a $25,000 Direct account, a 34-pip stop on 0.36 lots of EUR/USD risks about $122, 12% of the $1,000 first-day daily loss limit.
What is the MACD indicator?
The MACD indicator is a momentum and trend tool that shows the distance between two moving averages. When the fast average is above the slow one, the MACD line is above zero and price has been rising. When it is below, price has been falling. The size of the gap shows how strong the move is.
It is called convergence divergence because the averages move together (converge) and apart (diverge). When a trend accelerates, the gap widens and the line moves away from zero. When it slows, the gap shrinks and the line turns back toward it.
The default settings are 12, 26 and 9 and work as the standard on every platform. MACD is one of the indicators in the Academy indicators lesson, alongside RSI, moving averages and VWAP.
How is MACD calculated?
MACD line = 12-period EMA minus 26-period EMA. The signal line is a 9-period EMA of the MACD line. The histogram is the MACD line minus the signal line. An exponential moving average (EMA) weights recent prices more than old ones.
An EMA updates with each candle: new EMA = previous EMA + k x (close - previous EMA), where k = 2 / (period + 1). For the 12-period EMA, k = 0.1538. For the 26-period, k = 0.0741. Take EUR/USD with a previous 12-period EMA of 1.0860, a previous 26-period EMA of 1.0850 and a new close at 1.0880.
- New 12-period EMA = 1.0860 + 0.1538 x (1.0880 - 1.0860) = 1.08631.
- New 26-period EMA = 1.0850 + 0.0741 x (1.0880 - 1.0850) = 1.08522.
- MACD line = 1.08631 - 1.08522 = 0.00109, which is 10.9 pips.
If the signal line stands at 8 pips, the histogram is 10.9 - 8 = 2.9 pips and is shown as a bar above zero. The platform does this for you. What it shows is that MACD is measured in price units, so a reading of 10 pips means something different on a pair that moves 50 pips a day and one that moves 150.
How do you read the MACD signals?
There are three main signals: the cross of the MACD line and the signal line, the cross of the zero line, and divergence from price. Each reads trend strength differently, and each lags. Which one you use depends on whether you want early, noisy signals or later, steadier ones.
| Signal | What it shows | Common reading |
|---|---|---|
| MACD crosses above the signal line | Momentum turning up | Buy signal, stronger above zero |
| MACD crosses below the signal line | Momentum turning down | Sell signal, stronger below zero |
| MACD crosses above zero | The fast average is above the slow one | Uptrend confirmed |
| MACD crosses below zero | The fast average is below the slow one | Downtrend confirmed |
| Histogram shrinking | The gap between the lines is closing | Momentum fading |
The histogram turns first, then the lines cross, then the zero line crosses. Traders who want early signals use the histogram, and those who want fewer false ones use the zero line. The zero-line cross is the same event as a 12 and 26 moving average crossover, which the moving average crossover guide covers.
How does MACD divergence work?
MACD divergence appears when price makes a new high or low but MACD does not. A higher price high with a lower MACD high is bearish divergence, and shows the push is losing strength. A lower price low with a higher MACD low is bullish divergence.
Divergence is a warning and not an entry. It can show up and price can go on trending for a long time. Most traders wait for a second event, such as a break of structure or a cross of the signal line, before acting. The divergence trading guide covers how to mark it and what to do next.
How do you trade with MACD?
The common methods are the signal line cross with a trend filter, the zero-line cross and divergence. Each needs a trend to be present to pay, so start by deciding whether the market is trending. In a range, MACD crosses repeatedly and mostly produces small losses.
- Trend filter. Use a higher timeframe to decide the direction, such as a rising 4-hour chart. Take only buy crosses on the 1-hour chart, and ignore sell crosses.
- Signal cross. Buy when the MACD line crosses above the signal line, preferably with the lines above zero. This is a pullback ending inside an uptrend.
- Stop and target. Put the stop below the pullback low and target the previous high or a multiple of the risk.
The trend following guide shows how to define the trend that MACD then confirms. A signal in the direction of the trend, near a level that held before, is worth more than one in open space.
What does a MACD trade look like with real numbers?
This example is a buy on a 1-hour EUR/USD chart, on a $25,000 Direct account risking 0.5% per trade, which is $125. One standard lot of EUR/USD is worth $10 a pip. The prices are made up for teaching.
- The 4-hour chart is rising. On the 1-hour chart, price pulls back from 1.0900 to 1.0840 and starts to rise.
- The MACD line, which dipped below the signal line during the pullback, crosses back above it at a reading above zero. The candle closes at 1.0872. Buy at 1.0872.
- The stop goes at 1.0838, 2 pips below the pullback low. The risk is 34 pips.
- Size: $125 / (34 x $10) = 0.368 lots, rounded down to 0.36. A pip is $3.60, so the risk is 34 x $3.60 = $122.40.
- The target is 1.0940, just above the previous high, 68 pips away. That is worth 68 x $3.60 = $244.80, a ratio of 2 to 1.
Compare this with the sideways case. If EUR/USD moves between 1.0840 and 1.0900 for two days, MACD may cross six times, and each buy near the top fails. The trend filter and the level are what separate the two cases. Simulated trades carry costs like a live account: a commission when a trade opens and closes, and holding costs on positions kept overnight.
How this works on CMC Funded
On a $25,000 Direct account the daily loss limit is 4% of the day's starting equity, which is $1,000 on the first day, and the maximum loss is a fixed 6%, so the floor is $23,500. The limit is measured on equity, so a floating loss counts before you close the trade. The $122.40 trade uses about 12% of the daily limit.
MACD is a lagging tool, so signals arrive after a move has begun. The entry is later and the stop is longer, which makes the position smaller. At 34 pips, the position is 0.36 lots. A signal that arrives 30 pips later, with a 64-pip stop, would cut the same $125 risk to 0.19 lots.
The Direct profit target is 10%, which is $2,500, with at least 3 trading days and no time limit. Holding overnight is allowed, with holding costs, so a trend trade can be held while the signal stays valid. On the Classic route the daily limit is 5% and the maximum loss 10%. Read the rules for the definitions, and use the position size calculator.
Does MACD work?
MACD is a description of recent momentum, and as a stand-alone rule it has no reliable record. It does well in trends and badly in ranges, and it lags either way. Its value is as a filter that keeps you on the side of the trend.
Settings are the trap. Changing 12, 26, 9 to 8, 17, 9 can turn a poor test into a good one by fitting the past. Keep the defaults until your records show a reason to change them, and test on a different stretch of data from the one you tuned on. The trading journal template guide shows what to log.
Common mistakes
- Trading every cross. In a range, most crosses lose.
- Ignoring the higher timeframe. A bullish cross against a falling 4-hour trend is a bounce.
- Treating divergence as an entry. It is a warning, and trends can run long after it.
- Tuning the settings to the past. A fit to last month rarely holds next month.
- Comparing the reading between pairs. MACD is in price units, so 10 pips on one pair is not 10 on another.
- Entering late. After a long run, a cross leaves a long stop and a small target.
- Sizing from the signal and not the stop. The lots follow from the distance to the stop, 34 pips here.
Questions traders ask
What are the best MACD settings?
The standard 12, 26, 9 is the default on every platform. Faster settings give more signals and more false ones, and slower settings fewer. No setting has been shown to beat the others.
Is MACD a leading or lagging indicator?
It is lagging, because it is built from moving averages of past prices. The histogram and divergence give earlier hints than the line cross, but none predicts.
What does the MACD histogram show?
It shows the gap between the MACD line and the signal line. Growing bars mean momentum is increasing, and shrinking bars mean it is fading, even before the lines cross.
Can you use MACD with RSI?
Yes. MACD gives the trend and RSI the stretch or the range. The RSI indicator guide explains the second half of that pair.
Next steps
The Academy indicators lesson covers MACD alongside RSI, moving averages and VWAP. The Bollinger Bands guide shows a volatility tool that complements it. Size each trade from its stop with the position size calculator, and read the loss limits on the rules page.
You can compare the Classic and Direct routes on the challenges page.
