Moving average convergence divergence (MACD) is one of the most popular technical indicators in trading. The MACD is appreciated by traders worldwide for its simplicity and flexibility, as it can be used as a trend or momentum indicator and signal opportunities to enter and exit positions.
Learn more about MACD and some of the strategies used by traders.
- Moving average convergence divergence is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price.
- Traders use the MACD to identify when bullish or bearish momentum is high to identify entry and exit points for trades.
- MACD is used by technical traders in stocks, bonds, commodities, and FX markets.
- There are a number of MACD strategies that traders can use, including the histogram, the crossover, the zero-cross, the money flow index, and the relative vigor index.
- One of the biggest risks of using a MACD is that a reversal signal can be a false indicator.
MACD: An Overview
The concept behind the MACD is fairly straightforward. Essentially, it calculates the difference between an instrument's 26-day and 12-day exponential moving averages (EMA). In calculating their values, both moving averages use the closing prices of whatever period is measured.
On the MACD chart, a nine-period EMA of the MACD itself is also plotted. This line is called the signal line, which acts as a trigger for buy and sell decisions. The MACD is considered the faster line because the points plotted move more than the signal line, which is regarded as the slower line.
The MACD histogram is a visual representation of the difference between the MACD and its nine-day EMA—not highs and lows. The histogram is positive when the MACD is above its nine-day EMA and negative when the MACD is below its nine-day EMA. The point on the histogram where momentum is zero is the zero line.
If prices change rapidly, the histogram bars grow longer as the speed of the price movement—its momentum—accelerates and shrinks as price movement decelerates.
Divergence refers to a situation where factors move away from or are independent of others. Regarding MACD, it is a situation where price action and momentum are not acting together. For instance, divergence can indicate a period where the price makes successively lower highs, but the MACD histogram shows a succession of higher lows. In this case, the highs are moving lower, but price momentum is slowing, foreshadowing a decline that eventually follows.
By averaging up their short, the trader eventually earns a handsome profit, as the price makes a sustained reversal after the final point of divergence.
The moving average convergence divergence was invented by Gerald Appel.
Types of MACD Strategies
The MACD histogram can be a useful tool for some traders. While we've explained a little bit about how to read it above, let's explain how it works. It plots out the difference between the fast MACD line and the signal line. Traders can use the MACD histogram as a momentum indicator to jump ahead of changes in market sentiment.
There are three different elements involved with the histogram, which is mapped out around a baseline:
- The MACD line (subtracting a long-term exponential moving average (EMA) from a shorter-term EMA)
- The signal line (subtracting the two EMAs and creating a nine-day moving average)
- The histogram (subtracting the MACD line from the signal line)
Keep in mind, though, that the histogram doesn't come without its faults. Many traders often use other tools and techniques to determine and make their moves based on market sentiment, such as the trading volume of a given security.
A crossover occurs when the signal and MACD line cross each other. The MACD generates a bullish signal when it moves above its own nine-day EMA and sends a sell signal (bearish) when it moves below its nine-day EMA.
When the MACD crosses from below the zero line, it is considered a bullish signal. Traders generally take long positions when this occurs. If it crosses from above the zero line, it is considered a bearish signal by traders, who then enter short positions to take advantage of falling prices and increasing downward momentum.
In both cases, the longer the histogram bars , the stronger the signal. When there is a strong signal, it is more likely—but not guaranteed—that the price will continue in the trending direction.
Money Flow Index
The money flow index allows traders to use price and trading volume to identify and determine when assets are overbought or oversold in the market. This oscillator moves between 0 and 100 where readings below 20 are oversold and 80 are considered overbought.
One of the drawbacks of this strategy, though, is that it tends to produce fewer signals. That's because the readings it produces are extreme due to the fact that they are focused on spurts in volume and prices.
Relative Vigor Index (RVI)
The relative vigor index (RVI) is a commonly used momentum indicator in technical analysis. It measures how strong a trend is by comparing the trading range of a certain security with its closing price. The comparison is done by using a simple moving average (SMA) to smooth the results out.
Traders generally believe that the value of the RVI increases as a bullish trend continues to gain momentum. That's because, in this case, an asset's closing price tends to fall at the higher end of the range. The opening price, on the other hand, stays further down on the lower end of the range.
MACD With RSI and SMA
Traders may often use the MACD and relative strength index (RSI) indicator strategy. This allows them to use both the RSI and the SMA to their advantage. But what are they?
- The RSI allows treaders to measure how strong a trend is while being able to pinpoint different points of reversal along that trendline. This is mapped along a baseline of 14 periods over two different levels: an oversold and an overbought one. Where the levels are set depends entirely on the trader and their strategies. Some may choose conservative levels of 20 and 80.
- The SMA calculates the average range of prices by the number of periods in that range. This is usually done with closing prices. This indicator allows traders to assess whether they believe a trend will continue or reverse.
Combining these three strategies together allows traders to:
- Determine future price changes using the RSI
- Show how strong a trend is and where it's headed using the MACD
- Use the SMA as a lagging trend-following indicator
Drawbacks of MACD
Like any oscillator or indicator, the MACD has drawbacks and risks. One of the most significant risks is that a reversal signal can be a false indicator. For instance, the zero-cross image above has a point where the MACD crosses from below and back again in one trading session. If a trader entered a long position when the MACD crossed from below, they would be left with a losing stock if prices continued to fall.
MACD does not function well in sideways markets. If prices generally move to the side when they stay within a range between support and resistance. MACD tends to drift toward the zero line because there is no up or down trend—where the moving average works best.
Additionally, the MACD zero-cross is a lagging indicator because the price is generally above the previous low before the MACD crosses the line from below. This can cause you to enter a long position later than you might have been able to.
Example of a MACD Trading Strategy
We'll use our zero-cross image as an example of trading the zero-cross. As trading proceeds, you observe the MACD initially crossed the zero line from below, then crossed again from above. A trader might notice the histogram bars moving down with the MACD, indicating a possible reversal and opportunity for a short trade.
When the line crossed from above, the trader could take a short position and net a profit when the prices began to climb again.
The zero-cross strategy could be used again to take a long position when the MACD crosses the zero line from below. At the point circled in our image, prices have been rising and momentum is up. The trader could take a long position at this point.
What Is the Best MACD Strategy?
There are several strategies for trading the MACD. The best depends on your preferred trading style and which one you're comfortable using.
Which Indicator Works Best With the MACD Strategy?
In general, most traders use candlestick charts and support and resistance levels with MACD.
Why Does MACD Use 12 and 26?
MACD uses 12 and 26 as the default number of days because these are the standard variables most traders use. However, you can use any combination of days to calculate the MACD that works for you.
The Bottom Line
Moving average convergence divergence is one of the most-used oscillators because it has been proven to be a reliable method for identifying trend reversals and momentum. There are various strategies for trading MACD, but it's best to find one that works for you and your trading plan.