# What Is MACD?

The moving average convergence/divergence indicator helps investors identify price trends

## What Is MACD?

Moving average convergence/divergence (MACD) is a [technical indicator](https://www.investopedia.com/terms/t/technicalindicator.asp) that helps investors identify price trends, measure trend momentum, and identify entry points for buying or selling a security. Gerald Appel developed the MACD indicator in the 1970s, and it is still one of the most popular technical tools today. It is readily available on most trading platforms offered by top [online stock brokers](https://www.investopedia.com/best-online-brokers-4587872).

### Key Takeaways

*   Moving average convergence/divergence (MACD) is a technical indicator used to help investors identify entry points for buying or selling. The indicator is often available on the [best online brokerage platforms](https://www.investopedia.com/best-online-brokers-4587872).
*   The MACD line is calculated by subtracting the 26-period [exponential moving average (EMA)](https://www.investopedia.com/terms/e/ema.asp) from the 12-period EMA.
*   The signal line is a nine-period EMA of the MACD line.  
    
*   MACD is best used with daily periods, where the traditional settings of 26/12/9 days is the default.

![Moving Average Convergence/Divergence (MACD)](https://www.investopedia.com/thmb/NXDw1ZpgouIAUi7TJ4R9WIAVJtw=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/MACD-88b76e15562147d5bfe5108b169b74b3.png)

*— Xiaojie Liu / Investopedia*

## What MACD Signals

The MACD line is calculated by subtracting the 26-period EMA from the 12-period EMA. The calculation creates the MACD line. A nine-day EMA of the MACD line is called the [signal line](https://www.investopedia.com/terms/t/trade-signal.asp), plotted on top of the MACD line, which can function as a trigger for buy or sell signals.

Traders may buy the security when the MACD line crosses above the signal line and sell—or short—the security when the MACD line crosses below the signal line. MACD indicators can be interpreted in several ways, but the more common methods are [crossovers](https://www.investopedia.com/terms/c/crossover.asp), [divergences](https://www.investopedia.com/terms/d/divergence.asp), and rapid rises/falls.  

## MACD Formula

$\text{MACD}=\text{12-Period EMA }-\text{ 26-Period EMA}$

MACD is calculated by subtracting the long-term EMA (26 periods) from the short-term EMA (12 periods). An EMA is a [moving average (MA)](https://www.investopedia.com/terms/m/movingaverage.asp) that places a greater weight and significance on the most recent data points.

> **Important**
>
> The exponential moving average is an exponentially weighted moving average. An exponentially weighted moving average tends to have more significant reactions to recent price changes than a simple moving average (SMA).

## Using MACD

MACD has a positive value (shown as the blue line on the MACD chart) whenever the 12-period EMA (indicated by the red line on the price chart) is above the 26-period EMA (the blue line in the price chart), and a negative value when the 12-period EMA is below the 26-period EMA. The distance between MACD and its [baseline](https://www.investopedia.com/terms/b/baseline.asp) depends on the distance between the two EMAs.

As shown in the chart below, rises and drops in MACD (blue) values correspond to the movements of the two EMA lines.

![Image](https://www.investopedia.com/thmb/svT2HjExKmnVGZrhBbh0YIqpmqs=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/dotdash_Final_Moving_Average_Convergence_Divergence_MACD_Aug_2020-01-d70065c4e23241e18c117cbbb295dcce.jpg)

*— Image by Sabrina Jiang © Investopedia 2022*

MACD is often displayed with a [histogram](https://www.investopedia.com/terms/h/histogram.asp) (see the next chart below) that graphs the distance between MACD and its signal line. If MACD is above the signal line, the histogram will be above the MACD’s baseline or zero line. If MACD is below its signal line, the histogram will be below the MACD’s baseline. Traders use the MACD’s histogram to identify peaks of bullish or bearish momentum, and to generate overbought/oversold trade signals.

![Image](https://www.investopedia.com/thmb/rF2_pPnVoRGuI9-VYNzAIvjtbTI=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/dotdash_Final_Moving_Average_Convergence_Divergence_MACD_Aug_2020-02-58bf5e34f0f94730b6e2d56ef9032b6d.jpg)

*— Image by Sabrina Jiang © Investopedia 2022*

## MACD vs. Relative Strength

The [relative strength index (RSI)](https://www.investopedia.com/terms/r/rsi.asp) signals whether an instrument is considered [overbought](https://www.investopedia.com/terms/o/overbought.asp) or [oversold](https://www.investopedia.com/terms/o/oversold.asp) based on its recent price action. The RSI is an [oscillator that calculates the average](https://www.investopedia.com/terms/o/osma.asp) price gains and losses over a given period. The default is 14 periods with values bounded from 0 to 100. A reading above 70 suggests an overbought condition, while a reading below 30 is considered oversold, with both potentially signaling that a top or a bottom is forming.

Unlike the RSI or other oscillator studies, the MACD lines do not have concrete overbought/oversold levels. Rather, they function on a relative basis. An investor or trader should focus on the level and direction of the MACD/signal lines compared with preceding price movements in the security at hand, as shown below.

![MACD divergence](https://www.investopedia.com/thmb/XvK11ngTQgA8aSB-47Yd8WlUPyU=/797x0/filters:no_upscale():max_bytes(150000):strip_icc()/MACDImage-d509109bf4114dc08aed789f2017f733.jpg)

**

MACD measures the relationship between two EMAs to indicate momentum and potential trade reversals, while the RSI seeks out overbought and oversold conditions by evaluating recent price action. These indicators are often used together to give [analysts](https://www.investopedia.com/terms/a/analyst.asp) a more complete technical picture.

Both measure the momentum of an instrument, but they measure different factors. The two can sometimes give contradictory results. The RSI may show a reading above 70 (overbought) for a sustained period, indicating an instrument is overextended to the buy side. In contrast, the MACD may indicate that the instrument’s buy-side momentum is still growing. Either indicator may signal an upcoming trend change by showing divergence from price (price continues higher while the indicator turns lower, or vice versa).

## Limitations of MACD

A moving average divergence can signal a possible reversal, but it will also produce numerous ‘false positives’ along the way. False positive divergences often occur when the price of an asset moves sideways in a consolidation, such as in a [range](https://www.investopedia.com/terms/t/tradingrange.asp) or [triangle pattern](https://www.investopedia.com/terms/t/triangle.asp). A slowdown in the momentum—sideways movement or slow trending movement—of the price will cause MACD to pull away from its prior extremes and gravitate toward the zero lines even in the absence of a true reversal.

Confirmation should be sought by trend-following indicators, such as the [Directional Movement Index (DMI) system](https://www.investopedia.com/terms/d/dmi.asp) and its key component, the [Average Directional Index (ADX)](https://www.investopedia.com/terms/a/adx.asp). The ADX is designed to indicate whether a trend is in place, with a reading above 25 indicating a trend is in place (in either direction) and a reading below 20 suggesting no trend is in place.

Investors following MACD crossovers and divergences may double-check with the ADX before trusting a MACD signal. While MACD may show a bearish divergence, a check of the ADX may indicate that an uptrend is still in place. Such a double-check may help investors avoid the false bearish MACD trade signal and allow them to wait and see how the market develops. If MACD shows a bearish crossover and the ADX is in non-trending territory (<25) and has likely shown a peak and reversal, investors may be more willing to take the bearish trade.

## MACD Crossovers

As shown on the following chart, when MACD falls below the signal line, it is a bearish signal indicating that it may be time to sell. Conversely, when MACD rises above the signal line, the signal is bullish, suggesting that the asset's price might experience upward momentum. Crossovers are more reliable when they conform to the prevailing trend. If MACD crosses above its signal line after a brief downside correction within a longer-term uptrend, it qualifies as a bullish confirmation and the likely continuation of the uptrend.

![Image](https://www.investopedia.com/thmb/1ag6vZob0wyhBkG_a9SzsEpBjnE=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/dotdash_Final_Moving_Average_Convergence_Divergence_MACD_Aug_2020-03-b4e70e4507ac4578977e56461af09a01.jpg)

*— Image by Sabrina Jiang © Investopedia 2022*

If MACD crosses below its signal line following a brief move higher within a longer-term downtrend, traders would consider that a bearish confirmation.

![Image](https://www.investopedia.com/thmb/UPBUroSi7jPDiZ0Qg7o1dxYyIJo=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/dotdash_Final_Moving_Average_Convergence_Divergence_MACD_Aug_2020-04-cfe1f26792bb4e98884cee4f8b816cc7.jpg)

*— Image by Sabrina Jiang © Investopedia 2022*

## MACD Divergence

When MACD forms highs or lows that exceed the corresponding highs and lows in the instrument’s price, it is called a divergence. A bullish divergence appears when MACD forms two rising lows that correspond with two falling lows on the price. This is often a valid bullish signal when the long-term trend is still positive.

Some traders will look for bullish divergences even when the long-term trend is negative because they can signal a change in the trend, although this technique is less reliable.

![Image](https://www.investopedia.com/thmb/v3p9s_5houKVMM9_NQATQoumrrE=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/dotdash_Final_Moving_Average_Convergence_Divergence_MACD_Aug_2020-05-89bcc16eb76b4d158e0bcc00be800f2f.jpg)

*— Image by Sabrina Jiang © Investopedia 2022*

When MACD forms a series of two falling highs that correspond with two rising highs on the price, a bearish divergence has been formed. A bearish divergence that appears during a long-term bearish trend is considered confirmation that the trend is likely to continue.

Some traders will watch for bearish divergences during long-term bullish trends because they can signal weakness in the trend. However, it is not as reliable as a bearish divergence during a bearish trend.

![Image](https://www.investopedia.com/thmb/ATOmcRm3dR6_i3fWtCPjrGLB718=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/dotdash_Final_Moving_Average_Convergence_Divergence_MACD_Aug_2020-06-2c1e8c362840461ba45ca69c392447b9.jpg)

*— Image by Sabrina Jiang © Investopedia 2022*

## Example of Rapid Rises or Falls

When MACD rises or falls rapidly (the shorter-term moving average pulls away from the longer-term moving average), it signals that the security is overbought or oversold and may soon [retrace](https://www.investopedia.com/terms/r/retracement.asp) to normal levels. Traders often combine this analysis with the RSI or other technical indicators to verify overbought or oversold conditions.

![Image](https://www.investopedia.com/thmb/TZLojJEr86bTKO5aCC4fb83t2wk=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/dotdash_Final_Moving_Average_Convergence_Divergence_MACD_Aug_2020-07-f40701ee777742f8ac499a1cfd590b7c.jpg)

*— Image by Sabrina Jiang © Investopedia 2022*

It is not uncommon for investors to use the MACD’s histogram the same way they may use the MACD itself. Positive or negative crossovers, divergences, and rapid rises or falls can be identified on the histogram. Some experience is needed before deciding which is best in any given situation because there are timing differences between signals on the MACD and its histogram.

## How Do Traders Use Moving Average Convergence/Divergence (MACD)?

Traders [use MACD to identify changes](https://www.investopedia.com/articles/forex/08/macd-combo.asp) in the direction or strength of a stock’s price trend. MACD can seem complicated at first glance because it relies on additional statistical concepts such as the exponential moving average (EMA), but fundamentally, MACD helps traders detect when the recent momentum in a stock’s price may be starting to fade. This can help traders decide when to enter, add to, or exit a position.

## Is MACD a Leading Indicator or a Lagging Indicator?

MACD is a lagging indicator. The data used in MACD calculation is based on the historical price action, therefore MACD readings lag the price. However, some traders use MACD histograms to predict when a change in trend will occur. For these traders, this aspect of MACD might be viewed as a leading indicator of future trend changes.

## What Is a MACD Bullish/Bearish Divergence?

A MACD positive (or bullish) divergence is a situation in which MACD does not reach a new low, despite the price of the stock reaching a new low. This is seen as a bullish trading signal—hence, the term “positive/bullish divergence.” If the opposite scenario occurs—the stock price reaches a new high, but MACD fails to do so—this would be seen as a bearish indicator and termed “negative/bearish divergence.” In both cases, the setups suggest that the move higher/lower will not last, so investors need to look at other technical studies, like the relative strength index (RSI).

## The Bottom Line

MACD is a moving average, [best used with daily data](https://www.investopedia.com/ask/answers/122414/how-reliable-using-moving-average-convergence-divergence-macd-create-or-follow-trading-strategies.asp). Just as a crossover of the nine- and 14-day SMAs may generate a trading signal for some traders, a crossover of the MACD above or below its signal line may also generate a directional signal. MACD is based on EMAs with more weight placed on the most recent data, which means that it can react very quickly to changes of direction in the current price move.

Crossovers of MACD lines should be noted, but confirmation should be sought from other technical signals, such as the RSI, or perhaps a few [candlestick](https://www.investopedia.com/terms/c/candlestick.asp) price charts. Because it is a lagging indicator, MACD argues that confirmation in subsequent price action should develop before taking the signal.

> **Article Sources**
>
> 1.  CMT Association. "[Gerald Appel](https://cmtassociation.org/presenter/gerald-appel/)."