What Is MACD? Moving Average Convergence Divergence Explained
By Forex & Brokers DeskUpdated Nov 10, 2026

Definition
MACD is a momentum indicator that measures the gap between a 12-period and a 26-period exponential moving average, plotted with a 9-period signal line and a histogram.
Key takeaways
- A MACD line above zero means the 12-period EMA is above the 26-period EMA, consistent with an uptrend.
- A bullish crossover occurs when the MACD line crosses above its signal line, and a bearish one when it crosses below.
- Bullish divergence forms when price makes a lower low while MACD makes a higher low.
- MACD values are in price units, so readings cannot be compared across different instruments.
MACD (moving average convergence divergence) is a momentum indicator that measures the gap between two exponential moving averages of price. It shows whether that gap is widening or narrowing and in which direction. The standard MACD line is the 12-period exponential moving average (EMA) minus the 26-period EMA. A 9-period EMA of that line, called the signal line, is plotted alongside it, and a histogram shows the distance between the two. Gerald Appel developed MACD in the 1970s. The histogram was added later, usually credited to Thomas Aspray in 1986. Traders use the indicator to judge trend direction, trend momentum and possible entry or exit points.
How the MACD indicator works
MACD turns two moving averages into one line. Comparing a fast average with a slow one shows whether recent prices are pulling away from the longer-term trend. When the 12-period EMA moves away from the 26-period EMA, the averages are diverging and the MACD line moves away from zero. When they move back toward each other, they are converging and the line moves toward zero. That behavior gives the indicator its name.
The components of MACD
A standard MACD panel has four elements:
- MACD line: the difference between the 12-period and 26-period EMAs. This is the core of the indicator.
- Signal line: a 9-period EMA of the MACD line. Because it is an average of the MACD line, it trails it and acts as a trigger for crossover signals.
- Histogram: bars showing the MACD line minus the signal line. Bars above zero mean the MACD line is above the signal line, and bars below zero mean it is below.
- Zero line (baseline): the level where the two EMAs are equal. Crossing it means the 12-period EMA has crossed the 26-period EMA on the price chart.
The settings are usually written as MACD(12, 26, 9). The numbers originally referred to days, and daily charts remain the classic use. The calculation itself works on any period length, so the same settings applied to an hourly chart mean 12, 26 and 9 hours.
MACD formula
MACD line = 12-period EMA - 26-period EMA
Signal line = 9-period EMA of the MACD line
Histogram = MACD line - Signal line
Each EMA is updated bar by bar:
EMA today = (Close today - EMA yesterday) × k + EMA yesterday
k = 2 / (n + 1)
Here n is the number of periods. The multiplier k is about 0.1538 for the 12-period EMA, about 0.0741 for the 26-period EMA and 0.2 for the 9-period signal line. A larger multiplier gives more weight to the latest data in an exponential moving average, which is why the 12-period EMA reacts faster than the 26-period EMA. The first EMA value is commonly seeded with a simple average of the opening periods, so the earliest MACD readings on a new data series are less stable than later ones.
Worked example: calculating MACD
Hypothetical figures for a currency pair on a daily chart, chosen only to show the arithmetic.
Yesterday’s values:
- 12-period EMA: 1.0850
- 26-period EMA: 1.0820
- MACD line: 0.0030
- Signal line: 0.0022
Today the pair closes at 1.0890.
- New 12-period EMA: (1.0890 - 1.0850) × 0.1538 + 1.0850 = 1.08562
- New 26-period EMA: (1.0890 - 1.0820) × 0.0741 + 1.0820 = 1.08252
- New MACD line: 1.08562 - 1.08252 = 0.00310
- New signal line: (0.00310 - 0.0022) × 0.2 + 0.0022 = 0.00238
- New histogram: 0.00310 - 0.00238 = 0.00072
The MACD line is positive and rose from 0.0030 to 0.0031, so the fast EMA is above the slow EMA and the gap between them widened. The positive histogram shows the MACD line above its signal line. Together these readings describe upward momentum that is still growing on this bar.
How to read MACD
Above or below the zero line
The zero line answers the most basic question: which EMA is on top. A MACD line above zero means the 12-period EMA is above the 26-period EMA. Short-term average prices are higher than longer-term ones, which is consistent with an uptrend. Below zero means the reverse. A move from negative to positive is a centerline crossover. It corresponds to the fast EMA crossing above the slow EMA on the price chart and is read as a bullish shift. A move from positive to negative is read as bearish.
The distance from zero reflects how far apart the averages are. A MACD line far above zero means the short-term average has pulled well ahead of the longer-term one. A line drifting back toward zero, even while still positive, means that lead is shrinking.
Signal line crossovers
The crossover is the most widely used MACD trading signal:
- Bullish crossover: the MACD line crosses above the signal line. Traders may treat this as a buy signal or as confirmation of upward momentum.
- Bearish crossover: the MACD line crosses below the signal line. Traders may treat this as a sell signal or a cue to go short.
Crossovers are generally considered more dependable when they agree with the larger trend. In a long uptrend, a bullish crossover after a brief dip is read as confirmation that the uptrend is resuming. A bearish crossover after a short bounce in a long downtrend is read the same way in reverse. Crossovers against the prevailing trend are treated with more suspicion. A bullish crossover above the zero line agrees with an existing uptrend, while one deep below zero is an attempt to call a turn.
MACD divergence
A divergence occurs when MACD and price disagree about the size of a move.
- Bullish (positive) divergence: price makes a lower low, but MACD makes a higher low. The second push down carried less downward momentum than the first, which can mean selling pressure is fading.
- Bearish (negative) divergence: price makes a higher high, but MACD makes a lower high. The new price peak was reached with weaker upward momentum.
Context changes how divergences are read. A bullish divergence during a pullback in a long-term uptrend is a relatively strong signal that the uptrend may resume, while one in a long-term downtrend is a less reliable early warning of reversal. Likewise, a bearish divergence in a long-term downtrend suggests the decline may continue, and one in a long-term uptrend is a weaker warning that the advance is losing strength.
Rapid rises or falls
When the MACD line climbs or drops sharply, the short-term EMA is pulling quickly away from the longer-term EMA. Some traders read this as a sign that the market is overextended, overbought after a sharp rise or oversold after a sharp fall, and may retrace toward more normal levels. MACD has no fixed threshold for “too far,” so this reading is usually checked against another indicator built for overbought and oversold conditions, such as the RSI.
Reading the histogram
The histogram applies the same three readings at a different speed. Because it measures the gap between the MACD line and a smoothed version of itself, it tends to change direction before the MACD line crosses its signal line. Shrinking bars above zero show that the MACD line is still above the signal line but the gap is closing. A bearish crossover becomes possible if that continues. Growing bars show momentum accelerating in the direction of the bars.
Crossovers of the histogram’s zero line, divergences between histogram peaks and price peaks, and sharp histogram swings can all be traded. The timing differs from signals on the MACD line itself, so traders usually decide which version they will act on rather than mixing the two.
MACD settings and timeframes
The 12, 26, 9 combination is the default on most charting platforms, and the traditional reference point is daily data. Changing the settings changes the trade-off between speed and noise. Shorter periods make the EMAs react faster, which produces earlier signals and more of them, including more that reverse quickly. Longer periods smooth the lines and cut the number of signals, but each one arrives later.
MACD can be calculated on any price series, so it is used on stocks, indexes, currency pairs, commodities and crypto, on charts from minutes to months. Because its values are in price units, readings cannot be compared across instruments. A reading of 0.0031 on a currency pair and 4.5 on a stock say nothing about which has stronger momentum. Only the sign, direction and size relative to that instrument’s past readings carry meaning. Comparisons across very different price levels of the same asset have a similar problem, since moves of the same percentage produce larger MACD values at higher prices.
MACD vs. RSI
MACD and the Relative Strength Index (RSI) both measure momentum, but they measure it differently.
| MACD | RSI | |
|---|---|---|
| What it measures | Gap between a 12-period and a 26-period EMA | Ratio of average gains to average losses over a lookback period (14 by default) |
| Scale | Unbounded, in the instrument’s price units | Bounded from 0 to 100 |
| Overbought/oversold | No fixed levels; judged relative to past readings | Above 70 is conventionally overbought, below 30 oversold |
| Main signals | Crossovers, divergence, zero line | Extreme readings, divergence, 50-line |
The two can disagree. In a strong rally, RSI can stay above 70 and signal an overbought market while MACD is still rising. Neither is wrong. RSI reports that gains have dominated recent periods, and MACD reports that the short-term average is still pulling away from the long-term one. Both can warn of a trend change through divergence from price. Together they give one check on overextension and one on the direction and speed of momentum.
Is MACD a leading or lagging indicator?
MACD is a lagging indicator. Every input is a moving average of past prices, and the signal line is an average of an average. A crossover confirms a move that has already started, so part of the move has happened by the time it prints. In a fast reversal, it can arrive near the end of the move it is meant to catch. Some traders treat the histogram and divergences as partly leading, because they can show momentum slowing before price turns. Even so, they are built from historical data and indicate only that conditions for a turn may be forming.
Limitations of MACD
False signals in sideways markets. In a range or a consolidation such as a triangle pattern, the two EMAs flatten and wind around each other. The MACD line drifts toward zero and crosses its signal line repeatedly, producing crossovers and apparent divergences with no real trend behind them. A slow, grinding trend can have a similar effect: momentum cools, MACD falls back from its earlier extremes, and the indicator can suggest a reversal that never comes.
Divergence produces false positives. Divergence can come before reversals, but it also appears many times in trends that simply continue. A strong trend can show several bearish divergences in a row while price keeps rising.
Confirming with trend strength. A common filter is the Average Directional Index (ADX), the main component of the Directional Movement Index (DMI) system, which measures whether a trend is in place regardless of direction. Readings above 25 generally indicate a trend, and readings below 20 suggest no meaningful trend. If MACD shows a bearish divergence while ADX still indicates a strong uptrend, a trader using this filter might skip the signal and wait. A bearish crossover while ADX is below 25 and has peaked and turned down makes that trader more willing to take the bearish trade.
Confirmation can also come from price itself: support and resistance, candlestick patterns, or a close beyond a recent swing high or low. MACD says nothing about how far price may move against a position, so stops are usually based on price structure or a volatility measure such as the Average True Range. Trade size is then set from the stop distance with a tool such as a position size calculator.
MACD trading strategy basics
Most MACD strategies combine a few of the readings above into explicit rules. A typical trend-following setup might look like this:
- Define the trend using the zero line, a longer moving average or ADX. For example, consider long trades only while the MACD line is above zero.
- Wait for a pullback. During it, the MACD line falls toward or below its signal line.
- Enter on a bullish signal line crossover in the direction of the trend, ideally with confirmation from price or a second indicator.
- Exit on a bearish crossover, a bearish divergence, a stop based on price structure, or a combination agreed on before entering.
Reversal approaches rely on divergence instead. They wait for a bullish or bearish divergence and then a crossover or price break to confirm it. These setups trade against the prevailing trend, which is where MACD signals are considered less reliable.
Rules like these behave very differently across markets, timeframes and settings. Testing them on historical charts or in a paper trading simulator shows how often crossovers reverse in a given market before real money is involved.
FAQs
Is MACD an oscillator?
Yes, in the sense that it oscillates above and below a zero line. It is sometimes called the MACD oscillator. Unlike bounded oscillators such as RSI or the stochastic oscillator, it has no upper or lower limit, so it cannot mark fixed overbought or oversold levels.
The Bottom Line
MACD suits traders who want to judge trend direction and momentum, but it is a lagging indicator built entirely from past prices. Its signals are more dependable when they agree with the larger trend and weaker in sideways markets. Confirming signals with ADX or price action, basing stops on price structure, and testing rules on historical charts first all help reduce false signals.















