MACD Indicator
How the MACD is calculated and how traders use it to spot trend changes.
β±οΈ ~6 min read
Key Takeaways
- MACD is calculated from the difference between two exponential moving averages (typically 12-period and 26-period)
- A 'signal line' (typically a 9-period EMA of the MACD line) is plotted alongside it, and crossovers between the two are commonly watched
- The MACD histogram visualizes the distance between the MACD line and the signal line
- Like other momentum indicators, MACD is lagging in nature and can produce false signals, especially in sideways markets
What MACD is built from
The Moving Average Convergence Divergence (MACD) indicator is built from the relationship between two exponential moving averages (EMAs) of price β by convention, typically a 12-period EMA and a 26-period EMA. The MACD line itself is calculated as: MACD Line = 12-period EMA β 26-period EMA.
When the shorter EMA (12-period) is above the longer EMA (26-period), the MACD line is positive β suggesting recent prices have been higher relative to the longer-term average, often associated with upward momentum. When the shorter EMA is below the longer EMA, the MACD line is negative.
The signal line and crossovers
A 'signal line' is typically plotted alongside the MACD line β commonly a 9-period EMA of the MACD line itself. When the MACD line crosses above the signal line, this is sometimes interpreted as a potential bullish signal; when it crosses below, a potential bearish signal.
As with moving average crossovers generally, MACD signal line crossovers are based on past price relationships and can lag actual turning points in price β they're more often described as confirming or suggesting a possible shift in momentum than as precise timing tools.
The MACD histogram
The MACD histogram is a bar chart representing the difference between the MACD line and the signal line (MACD Line β Signal Line). When this difference is positive (MACD above signal), the histogram bars are typically shown above a zero line; when negative, below it. The histogram can help visualize the momentum of the MACD line itself β bars growing taller suggest the gap between MACD and signal is widening, while shrinking bars suggest it's narrowing (which can sometimes precede a crossover).
Example: Reading a MACD crossover
The MACD line has been below the signal line (negative histogram) during a decline.
The MACD line crosses above the signal line, and the histogram shifts from negative to positive.
Some traders would view this crossover as a potential early signal of waning downward momentum or a possible shift toward upward momentum β though, as with all such signals, it can also be followed by continued decline ('whipsaws'), especially in choppy markets.
MACD and the zero line
Whether the MACD line is above or below zero indicates the relationship between the two underlying EMAs β above zero means the shorter EMA is above the longer EMA (sometimes associated with an overall uptrend context), and below zero means the opposite. Some traders use the zero-line position as additional context for interpreting signal line crossovers (e.g., a bullish crossover occurring while MACD is still below zero might be interpreted differently than one occurring above zero).
Limitations
Because MACD is derived entirely from moving averages of past prices, it shares the general limitation of lagging indicators β it describes relationships that have already developed in price, rather than predicting future moves. In sideways or choppy markets, MACD crossovers can occur frequently without leading to sustained moves in either direction, sometimes referred to as 'whipsaws.'
Frequently Asked Questions
What do the numbers 12, 26, and 9 mean in MACD settings?+
These refer to the number of periods used for the two EMAs that form the MACD line (12 and 26) and the EMA used for the signal line (9) β this is the conventional default setting, though some traders adjust these values for different time frames or sensitivity.
Is MACD a leading or lagging indicator?+
MACD is generally considered a lagging indicator, since it's derived from moving averages of past price data β it can help confirm or describe momentum shifts that are already underway, but doesn't predict future price movement on its own.
Can MACD be used on any asset or time frame?+
Yes β MACD is commonly applied across stocks, ETFs, currencies, and other assets, and across time frames from intraday charts to weekly or monthly charts, though its typical behavior and reliability can vary by asset and time frame.