MACD (Moving Average Convergence Divergence)
Moving average convergence divergence is one of the most popular and widely used indicators in technical analysis. Let's try to see what is MACD and how do we use it in technical analysis to make our trading decisions. We will also see some unique MACD trading strategies. Please note that the explanation here is focused for Forex trading but the same is valid for stocks or any commodity trading.
Convergence and Divergence:
MACD (Moving Average Convergence/Divergence)- An Overview
Moving Average Convergence Divergence indicator was invented by Gerald Appel in 1960s.
Here we will discuss the about the MACD, it's construction, types of trading signals with some examples and also possible trading strategies.
MACD is comprised of two EMA (Exponential Moving Averages). please see the section “Moving Averages”. Two EMA means EMA for two time periods, one for longer period and one for shorter period. For example exponential moving average for past 12 periods and exponential moving average for past 26 periods.
Moving Average Convergence Divergence is a momentum Oscillator and can be used to know the momentum of the trading market.
Moving Average Convergence Divergence is unique in as it has lagging indicator elements as well as leading elements.
a) Moving averages are trend-following indicators. By trend following we mean that they tend to confirm the trend after it has begun and hence are classified as lagging indicators.
b) However, by taking the differences in the moving averages, this indicator incorporates aspects of momentum or leading elements. This is because it tells us in advance (with a slight lag) when a trend reversal may be taking place. We shall try to explain it in a simpler way as follows.
MACD is a momentum oscillator. It tells us whether the momentum of the trend is increasing or decreasing in a trending market i.e. in an uptrend or downtrend. It may give many false signals when the market is running sideways. False signals are more when the price movement range is narrow.
What is momentum:
In trading market the momentum is rate of price increase during uptrend and rate of price decrease during downtrends.
Let's say we are driving a car:
Suppose, between 2:00 PM and 3:00 PM the average speed was 100 km/hr. Between 3:00 PM to 4:00 PM the average speed was 110 km/hr and during the next hour i.e. between 4:00 PM and 5:00 PM the speed was 111 km/hr.
Now the average speed is continuously increasing. We may get the impression that it’s an uptrend as average is continuously getting higher. But it's an illusion as we have not considered the momentum. If we notice the current average speed i.e. speed between 4:00 PM to 5:00 PM, we would see that the momentum of increase in the average speed is dying down or getting reduced. This indicates the possibilities that the speed may further go down instead of going up, during the next hours.
Momentum takes out the illusion of the trend even if there is a constant upward or downward movement. And it tells us if the rate of change is slowing down or increasing. Slowing down of momentum may indicate the possibilities of a reversal in the trend.
Buying is signaled when the uptrend is gaining momentum and selling is signaled when the downtrend starts gaining momentum. MACD helps us in doing so.
What MACD is used for?
Let's consider a bullish market. Before entering the long position we would like to know if the momentum of the upward movement is maintained or it is slowing down. In case the uptrend is slowing down then the market might be going for a correction or reversal. That would mean that once we buy, there can be possibilities of a downward correction. The vice-versa is true in the downtrend or bearish market. If the downtrend is slowing down and we enter a short (sell) position, the downtrend may go for reversal and an upward move may start. Moving Average Convergence Divergence helps us in estimating the momentum of the trend.
During an uptrend we would like to buy when we find out that the uptrend is increasing. Because that tells us that we may expect further upward move.
Similarly in a downtrend we would like to enter the short position, when we get the confirmation that the downtrend is gaining momentum and getting stronger. This will indicate the possibilities that the market may fall further.
So the objective is to know when the uptrend or downtrend momentum is increasing and MACD helps us in that.
The most common period setting for MACD is 26, 12, 9. Now we will see what does it mean and how MACD is constructed.
Here “26” is EMA of previous 26 period, “12” is EMA of previous 12 periods. And MACD would be the line constructed by joining the points which we get by deducting EMA(26) from EMA(12).
i.e. MACD= shorter term moving average - longer term moving average.
In our case it means MACD = EMA for 12 periods – EMA of 26 periods.
Uptrend: If the EMA of previous 12 period (more recent data) is going over the EMA of 26 period (longer period data), it would indicate that in recent time the market started moving upward.
Downtrend: If the EMA of previous 12 period (more recent data) is going under (lower) the EMA of 26 period (longer period data), it would indicate that in recent time the prices have started going down.
We get Moving Average Convergence Divergence points for each moment by using the above formula. Then if we join all the points we get the MACD line. Of course we do not have to do this manual work as this will be done by our charting software or trading platform.
Now how do we find out the momentum by using MACD (Moving Average Convergence Divergence)? Please see the Forex chart 1 below.
Chart 1:
 |
If we see the above EUR/USD chart, we find that there is one more line which is known as “MACD Signal Line”.
The Signal line is derived by taking the Exponential Moving Average (EMA) of the MACD line. Here with MACD (26,12, 9) we are taking the EMA of MACD for pervious 9 periods.
Now we know that if the recent Moving Average (short term moving average) is more than the longer term moving average. It indicates an uptrend as it shows that recently the market is going up. But how do we find out the momentum of uptrend i.e. if the trend is strong or weak? We find the momentum by comparing the positive difference of the current period to the average difference. For this purpose we need to find out the average difference. This average difference is nothing but the “average” of the differences for past few periods. In our case (MACD 26,12, 9) it is the average of the differences over past 9 periods. Every technical analysis indicator has some default or most common settings and it is always advisable to use those. The reason is simple that majority of traders would be using those settings and that tends to control the strengths of the signals.
So what we are calculating with MACD is as follows:
1) Moving average of closing values for past 12 periods, say “X”
2) Moving average of the closing values for past 26 periods, say “Y”
3) Difference “X-Y” (MACD). If it is positive then it’s a signal for uptrend and if negative than of downtrend.
4) Moving average of “X-Y” for past 9 periods, say “Z”
5) If MACD line (connecting all “X-Y” points) crosses trigger line (line connecting all “Z” points, that would indicate that the current Moving Average Convergence Divergence is more than the MACD average for past 9 periods. This means that the difference (X-Y) is more than the normal difference. This indicates that the uptrend is increasing or gaining momentum. Time to buy.
Opposite of points 1 to 5 above would indicate the time to sell.
Summary of MACD Construction:
1. The main line, sometimes called as MACD fast line, is calculated by taking the difference between two Exponential Moving Averages (EMAs) - popularly the 12 and 26 period EMAs.
2. The signal line, sometimes called as the trigger line, is an EMA of the MACD main line. This popularly uses 9 period EMA of the Moving Average Convergence Divergence main line
3. The MACD histogram is a bar chart that shows the difference between the two lines (main line and signal line) mathematically, it is the signal line subtracted from the MACD main line (Histogram = Main Line – Signal Line)
4. We may also use shorter periods for shorter time frame trading. Shorter periods can also be used when market is very volatile.
In technical analysis, the main signals you have to watch for:
1) Main line crossing the signal line.
2) MACD main line crossing the center line.
3) Divergence / Convergence
1) MACD main line crossing signal line (trigger line):
When the main line crosses the signal line it gives a signal for change.
a) MACD main line moves from down to up: The recent upwards momentum is more than the normal. Uptrend is getting stronger (chart in Fig 2 & 3):
A bullish moving average Crossover occurs when the main line moves above its 9-day EMA, or trigger (signal) line. This crossover above signals that the trend for the currency pair is becoming bullish and it’s the time to buy. This is probably the most common signal. Please keep in mind that MACD works better during a reversal of a trend (uptrend to downtrend or vice-versa) or during the sideways market when the movement range is not very narrow.
b) MACD main line moves from up to down: The recent downward momentum is more than the normal. That means the downtrend is getting stronger (chart in Fig 2 & 3)
A bearish moving average Crossover occurs when MACD moves below its 9-day EMA (Exponential Moving Average), or trigger (signal) line. This is probably the most common signal. This crossover below signals that the trend is becoming bearish and it’s the time to sell. Please keep in mind that MACD works better during a reversal of a trend (uptrend to downtrend or vice-versa) or during the sideways market when the movement range is not very narrow.
2) MACD main line crossing the center line:
a) A Bullish Center line Crossover occurs when the main MACD line moves above the zero/Center line. This gives a clear signal that momentum has reversed from negative to positive (from downtrend to uptrend).
b) A Bearish Center line Crossover occurs when the main line moves below the zero/Center line. This gives a clear signal that momentum has reversed from positive to negative (from uptrend to downtrend).
Chart 2:
 |
Please take a note of the points A to F in the above Forex chart for EUR/USD:
Point A and associated area within the green circle:
The MACD main line moved over the trigger (signal line). This gives a “buy” signal or the signal confirming an uptrend. The price continued moving upwards with minor corrections. At point “D” the MACD line moved below the signal line. This gives a signal that the uptrend may be ending and a downtrend may start. This was the time to sell the already bought lot for EUR/USD. In case we were not holding any bought position before this point “D”, we could short-sell the currency pair here to benefit from the possible downtrend.
Point B and associated area within the green circle:
At point “B” the MACD main line crossed over the “Center line”. This again signals that a bullish uptrend may continue.
Point D and associated area within the red circle:
At point “D” the MACD line moved below the signal line. This gives a signal that the uptrend may be ending and a downtrend may start. This was the time to sell the already bought lot. In case we were not holding any bought position before this point “D”, we could short-sell here to benefit from the possible downtrend.
Point E and associated area within the red circle:
The MACD line started crossing the signal line upward. This singled that the market may start going up. This signal was not a strong signal as the MACD line did not really move up sharply.
Please take a note of areas within the circles of each points, as mentioned above. Before each crossover there has been a divergence. For example before the crossover at point D, the MACD line started moving downwards sharply (before the actual crossover). Similarly in the area of point “E”, the MACD line started moving upwards sharply before the actual crossover took place. In the area “C”, the MACD line started moving down but this move was not sharp. These sharp divergences may also indicate the possible change of the trend, but these need to be taken care of cautiously.
Some of the above mentioned points would become more clear later in this article.
In technical analysis it is not only the crossover signals but we need to watch the developments of the subsequent highs and lows. When the subsequent high or low points (peaks and valleys) in MACD line are going lower than the previous peaks or lows, it may give a good signal for an emerging down trend. Similarly if the subsequent high and low points in MACD line are going higher than the previous ones, it may give a good signal for an emerging uptrend.
Chart 3:
Chart 4:
Please check about MACD Histogram to see what is this indicator and how to use it in technical analysis.
Please also check more explanation about MACD Divergence and it's use in trading.
We have also tried to mention about some revised MACD trading strategies to avoid number of false trading signals.
You may also like to check some of our trading strategies by combining MACD with RSI and SAR for better trading decisions.
You may also check some good videos about MACD
We have explained about Moving Average Convergence Divergence in the context of technical analysis for "Forex trading" but it can be used in the same way for stocks or any commodity trading.
|