Moving Average Convergence Divergence (MACD)

Moving Average Convergence Divergence (MACD)

Table of Contents What Is MACD? Learning From MACD MACD vs. Relative Strength Limitations of MACD Example of MACD Crossovers Example of Divergence Example of Rapid Rises or Falls 0:39 MACD \= 12-Period EMA  −  26-Period EMA \\text{MACD}=\\text{12-Period EMA }-\\text{ 26-Period EMA} MACD\=12-Period EMA − 26-Period EMA MACD is calculated by subtracting the long-term EMA (26 periods) from the short-term EMA (12 periods). The MACD has a positive value (shown as the blue line in the lower 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. Table of Contents What Is MACD? Learning From MACD MACD vs. Relative Strength Limitations of MACD Example of MACD Crossovers Example of Divergence Example of Rapid Rises or Falls Traders may buy the security when the MACD crosses above its signal line and sell — or short — the security when the MACD crosses below the signal line.

Moving average convergence divergence (MACD) is calculated by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA.

What Is Moving Average Convergence Divergence (MACD)?

Moving average convergence divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA.

The result of that calculation is the MACD line. A nine-day EMA of the MACD called the "signal line," is then plotted on top of the MACD line, which can function as a trigger for buy and sell signals. Traders may buy the security when the MACD crosses above its signal line and sell — or short — the security when the MACD crosses below the signal line. Moving average convergence divergence (MACD) indicators can be interpreted in several ways, but the more common methods are crossovers, divergences, and rapid rises/falls.

Moving average convergence divergence (MACD) is calculated by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA.
MACD triggers technical signals when it crosses above (to buy) or below (to sell) its signal line.
The speed of crossovers is also taken as a signal of a market is overbought or oversold.
MACD helps investors understand whether the bullish or bearish movement in the price is strengthening or weakening.

MACD Formula

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

MACD is calculated by subtracting the long-term EMA (26 periods) from the short-term EMA (12 periods). An exponential moving average (EMA) is a type of moving average (MA) that places a greater weight and significance on the most recent data points.

The exponential moving average is also referred to as the exponentially weighted moving average. An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average (SMA), which applies an equal weight to all observations in the period.

Learning From MACD

The MACD has a positive value (shown as the blue line in the lower 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 more distant the MACD is above or below its baseline indicates that the distance between the two EMAs is growing.

In the following chart, you can see how the two EMAs applied to the price chart correspond to the MACD (blue) crossing above or below its baseline (dashed) in the indicator below the price chart.

Image

Image by Sabrina Jiang © Investopedia 2020 

MACD is often displayed with a histogram (see the chart below) which graphs the distance between the MACD and its signal line. If the MACD is above the signal line, the histogram will be above the MACD’s baseline. If the MACD is below its signal line, the histogram will be below the MACD’s baseline. Traders use the MACD’s histogram to identify when bullish or bearish momentum is high.

Image

Image by Sabrina Jiang © Investopedia 2020

MACD vs. Relative Strength

The relative strength indicator (RSI) aims to signal whether a market is considered to be overbought or oversold in relation to recent price levels. The RSI is an oscillator that calculates average price gains and losses over a given period of time. The default time period is 14 periods with values bounded from 0 to 100.

MACD measures the relationship between two EMAs, while the RSI measures price change in relation to recent price highs and lows. These two indicators are often used together to provide analysts a more complete technical picture of a market.

These indicators both measure momentum in a market, but, because they measure different factors, they sometimes give contrary indications. For example, the RSI may show a reading above 70 for a sustained period of time, indicating a market is overextended to the buy-side in relation to recent prices, while the MACD indicates the market is still increasing in buying momentum. 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

One of the main problems with divergence is that it can often signal a possible reversal but then no actual reversal actually happens — it produces a false positive. The other problem is that divergence doesn't forecast all reversals. In other words, it predicts too many reversals that don't occur and not enough real price reversals.

"False positive" divergence often occurs when the price of an asset moves sideways, such as in a range or triangle pattern following a trend. A slowdown in the momentum — sideways movement or slow trending movement — of the price will cause the MACD to pull away from its prior extremes and gravitate toward the zero lines even in the absence of a true reversal.

Example of MACD Crossovers

As shown on the following chart, when the MACD falls below the signal line, it is a bearish signal that indicates that it may be time to sell. Conversely, when the MACD rises above the signal line, the indicator gives a bullish signal, which suggests that the price of the asset is likely to experience upward momentum. Some traders wait for a confirmed cross above the signal line before entering a position to reduce the chances of being "faked out" and entering a position too early.

Crossovers are more reliable when they conform to the prevailing trend. If the MACD crosses above its signal line following a brief correction within a longer-term uptrend, it qualifies as bullish confirmation.

Image

Image by Sabrina Jiang © Investopedia 2020

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

Image

Image by Sabrina Jiang © Investopedia 2020

Example of Divergence

When the MACD forms highs or lows that diverge from the corresponding highs and lows on the price, it is called a divergence. A bullish divergence appears when the MACD forms two rising lows that correspond with two falling lows on the price. This is 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

Image by Sabrina Jiang © Investopedia 2020

When the 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

Image by Sabrina Jiang © Investopedia 2020

Example of Rapid Rises or Falls

When the MACD rises or falls rapidly (the shorter-term moving average pulls away from the longer-term moving average), it is a signal that the security is overbought or oversold and will soon return to normal levels. Traders will often combine this analysis with the relative strength index (RSI) or other technical indicators to verify overbought or oversold conditions.

Image

Image by Sabrina Jiang © Investopedia 2020

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 as well. 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 in the direction or severity of a stock’s price trend. MACD can seem complicated at first glance, since 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 signal a change in its underlying trend. 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. After all, all of the data used in MACD is based on the historical price action of the stock. Since it is based on historical data, it must necessarily “lag” the price. However, some traders use MACD histograms to predict when a change in trend will occur. For these traders, this aspect of the MACD might be viewed as a leading indicator of future trend changes.

What Is a MACD Positive Divergence?

A MACD positive divergence is a situation in which the MACD does not reach a new low, despite the fact that the price of the stock reached a new low. This is seen as a bullish trading signal — hence, the term “positive divergence.” If the opposite scenario occurs — the stock price reaching a new high, but the MACD failing to do so — this would be seen as a bearish indicator and referred to as a negative divergence.

Related terms:

Investment Analyst

An investment analyst is an expert at evaluating financial information, typically for the purpose of making buy, sell, and hold recommendations for securities. read more

Baseline

A baseline is a fixed point of reference that is used for comparison purposes. In business, the success of a project or product is often measured against a baseline number. read more

Bollinger Band® (Technical Analysis)

A Bollinger Band® is a momentum indicator used in technical analysis that depicts two standard deviations above and below a simple moving average. read more

Breakout and Example

A breakout is the movement of the price of an asset through an identified level of support or resistance. Breakouts are used by some traders to signal a buying or selling opportunity. read more

Candlestick

A candlestick is a type of price chart that displays the high, low, open, and closing prices of a security for a specific period and originated from Japan. read more

Continuation Pattern

A continuation pattern suggests that the price trend leading into a continuation pattern will continue, in the same direction, after the pattern completes. read more

Crossover

A crossover is the point on a stock chart when a security and an indicator intersect.  read more

Cup and Handle

A cup and handle is a bullish technical price pattern that appears in the shape of a handled cup on a price chart. read more

Derivative Oscillator

The derivative oscillator is similar to a MACD histogram, except the calculation is based on the difference between an SMA and a double-smoothed RSI. read more

Divergence and Uses

Divergence is when the price of an asset and a technical indicator move in opposite directions. Divergence is a warning sign that the price trend is weakening, and in some case may result in price reversals. read more

show 39 more