**Introduction of MACD**

Learning to trade in the direction of the short-term momentum can be a difficult task at the best of times, but it is exponentially more difficult when one is unaware of the appropriate tools that can help. This article will focus on the most popular indicator used in technical analysis, the Moving Average Convergence Divergence (MACD).

This technical analysis indicator, developed by Gerald Appel in the late seventies, Moving Average Convergence-Divergence is one of the simplest and most effective momentum indicators available.

MACD turns two trend-following indicators, moving averages, into a momentum oscillator by subtracting the longer moving average from the shorter moving average. As a result, the momentum oscillator offers the best of both worlds: trend following and momentum. It fluctuates above and below the zero line as the moving averages converge, cross and diverge.

Traders can look for signal line crossovers, centerline crossovers and divergences to generate signals. As the indicator is unbounded, it is not particularly useful for identifying overbought and oversold levels.

It is also used extensively to spot changes in the strength, direction, momentum, and duration of a trend in a stock's price. This is an overview of the MACD, a technical analysis indicator. The development, definition, its components, the calculation involved, transaction signals and interpretations, as well as uses and drawbacks.

**History**

The MACD was invented by Gerald Appel in the 1970's. Thomas Aspray added a histogram to the indicator in 1986, as a means to anticipate the oscillators crossovers, an indicator of important moves in the underlying security.

**Gerald Appel** is a professional money manager, with over 30 years trading experience. He is one of the most prolific inventors of technical trading tools, many of which have become popular worldwide. He is the originator of MACD (Moving Average Convergence-Divergence) and MACD-Histogram, considered essential trading tools by many traders.

Photo: Gerald Appel

**Tom Aspray** found that MACD signals often lagged important market moves, especially when applied to weekly charts. He first experimented with changing the moving averages and found that shorter moving averages did indeed speed up the signals. However, he was looking for a means to anticipate MACD crossovers and came up with the MACD Histogram.

Photo: Thomas Aspray

**The MACD Histogram**

The MACD Histogram is useful for anticipating changes in trend.

**Overview**

The MACD Histogram (MACD-H) consists of vertical bars showing the difference between the MACD line and its signal line.

• A change in the MACD-H will usually precede any changes in MACD.

• Signals are generated by direction, zero line crossovers and divergence from MACD.

• As an indicator of an indicator, MACD-H should be compared with MACD rather than with the price action of the underlying market.

MACD-H is used with MACD as a complementary indicator.

**Definition of MACD**

The MACD is a trend-following momentum indicator that shows the relationship between two moving averages of prices. The MACD is calculated by subtracting the 26-day

exponential moving average (EMA) from the 12-day EMA. A nine-day EMA of the MACD, called the "signal line", is then plotted on top of the MACD, functioning as a trigger for buy and sell signals.

More simply put, the MACD is a computation of the difference between two exponential moving averages (EMAs) of closing prices. This difference is charted over time, alongside a moving average of the difference. The divergence between the two is shown as a histogram or bar graph.

Exponential moving averages highlight recent changes in a stock's price. By comparing EMAs of different periods, the MACD line illustrates changes in the trend of a stock. Then by comparing that difference to an average, an analyst can chart subtle shifts in the stock's trend.

Since the MACD is based on moving averages, it is inherently a lagging indicator. As a metric of price trends, the MACD is less useful for stocks that are not trending or are trading erratically.

Note that the term "MACD" is used both generally, to refer to the indicator as a whole, and specifically, to the MACD line itself.

The MACD compares two exponential moving averages, and displays the difference between the moving averages as a single line, with positive and negative values, above and below a zero line (an oscillator). The MACD is displayed on its own chart, separate from the price bars, and is the lower section in the example chart.

**Basic Components**

The graph below shows a stock with a MACD indicator underneath it. The indicator shows a blue line, a red line, and a histogram or bar chart which calculates the difference between the two lines. Values are calculated from the price of the stock in the main part of the graph.

For the example above this means:

• MACD line (blue line): difference between the 12 and 26 days EMAs

• signal (red line): 9 day EMA of the blue line

• histogram (bar graph): difference between the blue and red lines

**Mathematically**

• MACD = EMA[fast,12] – EMA[slow,26]

• signal = EMA[period,9] of MACD

• histogram = MACD – signal

The period for the moving averages on which an MACD is based can vary, but the most commonly used parameters involve a faster EMA of 12 days, a slower EMA of 26 days, and the signal line as a 9 day EMA of the difference between the two. It is written in the form, MACD(faster, slower, signal) or in this case, MACD(12,26,9).

**Calculating the MACD**

**OR SIMPLY…..**

MACD: (12-day EMA - 26-day EMA)

Signal Line: 9-day EMA of MACD

MACD Histogram: MACD - Signal Line

*Example Using QQQQ*

Standard MACD is the 12-day Exponential Moving Average (EMA) less the 26-day EMA. Closing prices are used for these moving averages. A 9-day EMA of MACD is plotted alongside to act as a signal line to identify turns in the indicator. The MACD-Histogram represents the difference between MACD and its 9-day EMA, the signal line. The histogram is positive when MACD is above its 9-day EMA and negative when MACD is below its 9-day EMA.

**Interpretation**

As its name implies, MACD is all about the convergence and divergence of the two moving averages. Convergence occurs when the moving averages move towards each other. Divergence occurs when the moving averages move away from each other. The shorter moving average (12-day) is faster and responsible for most MACD movement. The longer moving average (26-day) is slower and less reactive to price changes in the underlying security.

MACD oscillates above and below the zero line, which is also known as the centerline. These crossovers signal that the 12-day EMA has crossed the 26-day EMA. The direction, of course, depends on direction of the moving average cross. Positive MACD indicates that the 12-day EMA is above the 26-day EMA. Positive values increase as the shorter EMA diverges further from the longer EMA. This means upside momentum is increasing. Negative MACD indicates that the 12-day EMA is below the 26-day EMA. Negative values increase as the shorter EMA diverges further below the longer EMA. This means downside momentum is increasing.

**Interpreting the MACD**

There are three common methods used to interpret the MACD:

**1. Crossovers** - As shown in the chart, when the MACD falls below the signal line, it is a bearish signal, which 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. Many traders wait for a confirmed cross above the signal line before entering into a position to avoid getting getting "faked out" or entering into a position too early, as shown by the first arrow.

**2. Divergence** - When the security price diverges from the MACD. It signals the end of the current trend.

**3. Dramatic rise** - When the MACD rises dramatically - that is, the shorter moving average pulls away from the longer-term moving average - it is a signal that the security is overbought and will soon return to normal levels.

There are several more methods and many variations as well.

Traders also watch for a move above or below the zero line because this signals the position of the short-term average relative to the long-term average. When the MACD is above zero, the short-term average is above the long-term average, which signals upward momentum. The opposite is true when the MACD is below zero. As you can see from the chart above, the zero line often acts as an area of support and resistance for the indicator.

**The Indicator**

Notice how the moving averages diverge away from each other in the graph, as the strength of the momentum increases. The MACD was designed to profit from this divergence by analyzing the difference between the two exponential moving averages. Specifically, the value for the long-term moving average is subtracted from the short-term average and the result is plotted onto a chart. The periods used to calculate the MACD can be easily customized to fit any strategy, but traders will commonly rely on the default settings of 12- and 26-day periods.

A positive MACD value, created when the short-term average is above the longer-term average, is used to signal increasing upward momentum. This value can also be used to suggest that traders may want to refrain from taking short positions until a signal is generated that suggests it is appropriate to do so. On the other hand, falling negative MACD values suggest that the downtrend is getting stronger and that it may not be the best time to buy.

**Transaction Signals**

**Signal Line**

It has become standard to plot a separate moving average alongside the MACD, which is used to create a clear signal of when the momentum is shifting. A signal line, also known as the trigger line, is created by taking a nine-period average of the MACD and is found plotted alongside the indicator on the chart. As you can see in the graph below, transaction signals are generated when the MACD line crosses through the signal line (nine-period exponential moving average (EMA) - dotted blue line).

The basic bullish signal (buy sign) occurs when the MACD line crosses above the signal line, and the basic bearish signal (sell sign) is generated when the MACD crosses below the signal line. Traders who attempt to profit from bullish MACD crosses that occur when the indicator is below zero should be aware that they are attempting to profit from a change in the direction of the momentum, while the moving averages are still suggesting that the security could experience a short-term sell off. This bullish crossover can often correctly predict the reversal in the trend as shown in graph, but it is often considered riskier than if the MACD were above zero.

Another common signal that many traders watch for occurs when the indicator travels in the opposite direction of the asset's, known as divergence. This concept takes further study and is often used by experienced traders.

**The Centerline**

As mentioned earlier, the MACD indicator is calculated by taking the difference between a short-term moving average (12-day EMA) and a longer-term moving average (26-day EMA). Given this construction, the value of the MACD indicator must be equal to zero each time the two moving averages cross over each other. As you can see in the graph below, a cross through the zero line is a very simple method that can be used to identify the direction of the trend and the key points when momentum is building.

**Advantages**

In the previous examples, the various signals generated by this indicator are easily interpreted and can be quickly incorporated into any short-term trading strategy. At the most basic level, the MACD indicator is a very useful tool that can help traders ensure that short-term direction is working in their favor.

Centerline crossovers can last a few days or a few months. It all depends on the strength of the trend. MACD will remain positive as long as there is a sustained uptrend. MACD will remain negative when there is a sustained downtrend. The chart below shows Pulte Homes (PHM) with at least four centerline crosses in nine months. The resulting signals worked well because strong trend emerged soon thereafter.

Zero Crossover

A crossing of the MACD line through zero happens when there is no difference between the fast and slow EMAs. A move from positive to negative is bearish and from negative to positive, bullish. Zero crossovers provide evidence of a change in the direction of a trend but less confirmation of its momentum than a signal line crossover.

**Divergence Patterns**

Like the RSI this is when a price continues to rise, but the momentum is fading. For example, a bearish divergence occurs when the MACD lines are well above zero and start to weaken, despite the price continuing to rise. This is flashing a big amber warning sign that the trend isn’t sustainable.

A bullish divergence occurs when the MACD lines are well below zero and start to rise, even though the price is continuing to fall.

**Divergences**

Divergences form when MACD diverges from the price action of the underlying security. A bullish divergence forms when a security records a lower low and MACD forms a higher low. The low lower in the security affirms the current downtrend, but the higher low in MACD shows less downside momentum. The slowing of the downtrend sometimes foreshadows a trend reversal or a sizable rally.

In the chart below, it shows Google (GOOG) with a bullish divergence in October-November 2008.

- First, notice that I am using closing prices to identify the divergence. The MACD moving averages are based on closing prices and we should consider closing prices in the security as well.
- Second, notice that there were clear reaction lows in October as Google bounced for a few weeks and MACD moved above its signal line.
- Third, notice that MACD formed a higher high as Google formed a lower low in November. This bullish divergence was confirmed with a signal line crossover in early December.

**Drawbacks**

The biggest disadvantage of using this indicator to generate transaction signals is that a trader can get whipsawed in and out of a position several times before being able to capture a strong change in momentum. As you can see from the chart, the lagging aspect of this indicator can cause several transaction signals to be generated during a prolonged move and this may cause the trader to realize several unimpressive gains or even small losses during the rally.

Traders should be aware that the whipsaw effect can be severe in both trending and range bound markets, because relatively small movements can cause the indicator to change directions quickly. The large number of false signals can result in a trader taking many losses. When commissions are factored into the equation, this strategy can become very expensive.

Another drawback of the MACD is its inability to make comparisons between different securities. Because the MACD is the dollar value between the two moving averages, the reading for differently priced stocks provides little insight when comparing a number of assets to each other. In an attempt to fix this problem, many technical analysts will use the percentage price oscillator, which is calculated in a similar fashion as the MACD, but analyzes the percentage difference between the moving averages rather than the dollar amount.

**Oscillator Classification**

**Absolute Price Oscillator (APO)**

The MACD is an absolute price oscillator (APO), because it deals with the actual prices of moving averages rather than percentage changes.

**Percentage Price Oscillator (PPO)**

A percentage price oscillator (PPO), on the other hand, computes the difference between two moving averages of price divided by the longer moving average value.

While an APO will show greater levels for higher priced securities and smaller levels for lower priced securities, a PPO calculates changes relative to price. Subsequently, a PPO is preferred when: comparing oscillator values between different securities, especially those with substantially different prices; or comparing oscillator values for the same security at significantly different times, especially a security whose value has changed greatly.

**Detrended Price Oscillator (DPO)**

A third member of the price oscillator family is the detrended price oscillator (DPO), which ignores long term trends while emphasizing short term patterns.

**Trading Use**

As the MACD is a momentum indicator, it shows positive momentum when it is above the zero line, and negative momentum when it is below the zero line (similar to the Commodity Channel Index (CCI)). There are many different ways of interpreting the MACD during trading, but the most popular ways (not necessarily the most profitable) include the MACD crossing its signal line and the MACD crossing the zero line. The MACD can also be used as a divergence indicator, with long entries signaled by bullish divergence, and short entries signaled by bearish divergence.

The MACD can be used quite simply when employing a crossover method. A trading signal is generated when the fast line crosses the slow line, in the direction of the cross. In the above example the blue line is the fast MACD line and the red line is the slower MACDA line. A buy signal is generated when the blue line crosses above the red line and a sell signal is generated when the blue line crosses below the red line.

In the above example, the first crossover on the chart in September generated a sell signal, which was countered by a buy signal in Oct and another sell signal later in October. Each signal can be used as a trigger to take a new position, not necessarily as a stop or an exit for the previous signal.

Divergence means moving apart, while convergence means moving closer together. In this case we are referring to whether the two indicator lines are converging or diverging. Convergence of the indicators indicates trend change or consolidation of the current, recent trend. Divergence is associated with a developing trend, as the lines move further apart they indicate an accelerating market move, whereas when the lines are moving closer together they indicate the trend slowing.

The MACD is a boundless indicator so it's very dangerous to try and apply overbought/oversold characteristics to the market using this indicator, as it can just keep going. Therefore it's a great trend following indicator while at first, resembling an oscillator type indicator. We can use the zero line though and when the indicator crosses above or below the zero line we can take that as a possible change in longer term trend. If the MACD crosses above the zero line it indicates a bull market trend and below a bear market trend. In the above example all the activity is above the zero line so we're clearly in a bull market.

Despite the fact that it is a boundless indicator the market will tend to set up its own parameters. This is one of the benefits of watching the MACD rather than the two underlying moving averages that go make it up. Peaks in the indicator tend to happen at around the same level and therefore as the indicator approaches an old peak we can read that as potential for a change in the short term trend, as it has probably over-extended itself, relative to the longer term.

We can see in the above example that the blue line peaked just below +300 in early September, which established a reference high for the indicator. So when we see the indicator approach that level again in October, this time with price 50 points higher, we can look for associated signals of deterioration to issue a sell signal. That came in two ways, first by convergence of the two indicators and then by a cross of the two indicators. Nevertheless due to the absolute location of the indicator, well above the zero line, we can view this as a correction to the underlying bull market trend, rather than a complete change in that underlying trend.

**Summary**

MACD is special because it brings together momentum and trend in one indicator. This means MACD will never be far removed from the actual price movements of the underlying security. This unique blend of trend and momentum can be applied to daily, weekly or monthly charts. The standard setting for MACD is the difference between the 12 and 26-period EMAs. Chartists looking for more sensitivity may try a shorter short-term moving average and a longer long-term moving average (5, 35, and 5). Chartists looking for less sensitivity may consider lengthening the moving averages. A less sensitive MACD will still oscillate above/below zero, but the centerline crossovers and signal line crossovers will be less frequent.

MACD is not particularly good for identifying overbought and oversold levels. Even though it is possible to identify levels that are historically overbought or oversold, MACD does not have any upper or lower limits to bind its movement. MACD can continue to overextend beyond historical extremes during sharp moves.

MACD calculates the absolute difference between two moving averages. This means MACD values are dependent on the price of the underlying security. MACD for a $20 stocks may range from -1.5 to 1.5, while MACD for a $100 may range from -10 to +10. It is not possible to compare MACD for securities that vary in price. An alternative is to use the Percentage Price Oscillator (PPO), which shows the percentage difference between two moving averages.

**Conclusion**

The MACD indicator is the most popular tool in technical analysis because it gives traders the ability to quickly and easily identify the direction of the short-term trend. The clear transaction signals help minimize the subjectivity involved in trading and the crosses over the signal line make it easy for traders to ensure that they are trading in the direction of the momentum. Very few indicators in technical analysis have proved to be more reliable than the MACD, and this relatively simple indicator can quickly be incorporated into any short-term trading strategy.