Welcome to the ultimate guide on how to use the MACD effectively.
This won’t be your standard tutorial that tells you to blindly buy every MACD crossover.
Instead, I’m going to let you in on some unheard secrets about the MACD. Secrets that I personally employed as a hedge fund manager.
The truth is that most amateur traders don’t understand the nuances I’m about to disclose. I certainly haven’t found it anywhere else on the internet.
So, if you want to get ahead of the competition and improve your success rate with this indicator, then keep reading.
What is the MACD Indicator?
The MACD is one of the most popular technical indicators traders use.
Specifically, it’s a trend-following momentum indicator that detects bullish or bearish trends, as well as potential reversals in those trends.
As such, it helps traders time entry and exit points for their trades.
In this sense, it’s very similar to the Rahul Mohindar Oscillator.
What Does MACD Stand For?
Moving Average Convergence Divergence
MACD stands for moving average convergence divergence.
As you will see in the next section, the MACD measures the speed at which different moving averages converge or diverge with each other.
In doing so, it conveys information about the momentum of the underlying stock price.
How to Setup MACD Indicator
There are 3 components that make up the MACD indicator:
- MACD Line
- Signal Line
- Histogram
In turn, these are built up of exponential moving averages (EMA).
I show you their calculations below.
MACD Line
To calculate the MACD line, you simply subtract the 26-period EMA from the 12-period EMA.
MACD Line = 12-period EMA – 26-period EMA
The 12-period moving average is known as the “fast” moving average, because it’s more sensitive to recent price movements.
Conversely, the 26-period moving average is known as the “slow” moving average, because it’s less sensitive to recent moves. Therefore, it lags behind the shorter moving average.
The logic follows that the faster the share price moves in either direction, the further the short-term moving average “diverges” from the long-term moving average. This causes the MACD line to move away from the zero line.
As the share price levels off, the slow moving average catches up to the fast moving average – leading to a “convergence”. This brings the MACD line towards zero again.
How to Setup MACD Line
The chart below comes from TradingView, and shows that the value of the MACD is simply the distance between the two moving averages (highlighted by the arrows). You may also be interested in TradingView alternatives that offer similar charting functionality.
Initially, the price is in an uptrend, with the 12-day moving average above the 26-day moving average. As the gap between them grows (divergence), the MACD value becomes increasingly positive.
When the uptrend moderates, the two moving averages converge. At this point, the MACD reverts back towards the zero line – signalling the start of a new downtrend. When the 12-day EMA crosses below the 26-day EMA, the MACD becomes negative.
Signal Line
The signal line is simply the 9-period EMA of the MACD line.
Signal Line = 9-period EMA of MACD Line
Since the signal line is just a moving average, it lags behind the MACD line – as you can see in the chart below.
MACD Histogram
The MACD histogram is the difference between the MACD line and signal line.
Histogram = MACD Line – Signal Line
When the histogram is positive, the MACD is above the signal and a bullish trend is in place. When it’s negative, the MACD is below the signal and a bearish trend is in place.
If it becomes either too positive or too negative, the share price move is extended – signalling a potential reversal.
The chart below shows all 3 components of the MACD indicator. The distance between the MACD and signal lines (highlighted by the arrows), represents the MACD histogram.
Best MACD Settings
You may be asking why the moving average periods are specifically 12, 26, and 9.
Is this the best MACD setting? Or do a different set of moving averages work better?
The truth is that there is no such thing as “best MACD settings”, as markets change all the time.
And even if you do find a MACD setting that works well for one particular security, it may not work well for others.
The 12, 26, and 9-period moving averages are the default industry standard. I’m not too sure where those numbers came from, but you can change them as you like.
Many traders prefer to use shorter-term moving averages to get more “timely” buy and sell signals. By this, I mean signals that get you in and out of trades earlier – thereby locking in more profits.
However, the trade-off with using shorter-term moving averages, is that you get more frequent buy or sell signals. This higher frequency leads to more false signals, which I will get into below.
MACD Trading Strategies
Ok, so now we know what the MACD indicator is and how to calculate it.
But you’re probably wondering how to actually use the MACD indicator.
Well, fear not, because below are some of the most common MACD trading strategies.
I will cover their basic principles, and then add my two cents for how to get the best out of them.
MACD Crossover
One of the most basic MACD trading strategies is the MACD crossover.
A crossover occurs when the MACD line crosses the signal line.
This generates either a buy or sell signal depending on the direction of the crossover.
Sounds simple, right?
Not so fast though.
Unfortunately, there is a bit more to it than this. Using the MACD in a simple trading system will only lead to disappointment.
The reality is that price action needs to be considered before trading a crossover.
This is the nuance that most amateur traders miss. They try and trade every crossover, only to find that most are false signals.
Below, I show you how to “finesse” this trading strategy by analysing price action.
But first, let’s cover the definitions of a bullish and bearish crossover.
Scanz is a great platform to perform MACD crossover scans in real-time. To find out more, read my Scanz review here.
MACD Bullish Crossover
A bullish MACD crossover occurs when the MACD line crosses above the signal line.
This generates a buy signal and ushers the beginning of a new, bullish trend. At this point, you’re advised to enter a new long position or cover an existing short position.
The green arrows in the chart below show all of the buy signals generated by the MACD.
MACD Bearish Crossover
Conversely, a bearish crossover is when the MACD line crosses below the signal line.
A sell signal occurs at the cross – indicating the start of a new bearish trend. This is an opportunity to take profits on a long position, or enter into a new short position.
The red arrows in the following chart show where these sell signals occur.
What is a False MACD Signal?
As you can see, this MACD trading strategy is pretty easy to grasp.
So you’re probably asking yourself: “Why am I not rich already?”. “Surely it can’t be this easy to make money in the market?!”
And you’d be right. Because alas… there is a catch.
Unfortunately, there are many times where the MACD indicator generates a “false signal”.
A false MACD signal is when a buy or sell signal quickly reverses because of a sharp turn in the stock price.
Since the MACD is a lagging indicator, this means you end up buying high and selling low – the opposite of what you’re supposed to do.
Let me show you what I mean…
In the weekly chart of Shimano below, you will see all of the buy and sell signals from the moving average convergence divergence (MACD) indicator.
In addition, you will also see lines connecting the closing price of a “buy” candle with the closing price of the next “sell” candle. And the closing price of a “sell” candle with the closing price of the next “buy” candle.
If the line is green then the signal was profitable. However, if it’s red the signal was unprofitable.
The red lines are examples of a false MACD signal.
These tend to feature prominently in range-bound markets (as below). The lagging nature of the MACD means it’s not well suited for choppy price action. By the time it signals a buy or sell, it’s usually time for a reversal in the opposite direction.
Out of the 19 buy and sell signals below, 14 were unprofitable while only 5 were profitable.
The charting software used for this chart is MetaStock. If you’re interested in learning more about the features in this technical analysis platform, read here for my MetaStock review.
How to Trade the MACD Crossover Effectively
While you won’t avoid every false signal, there are ways to mitigate them.
And I’m about to show you…
First, it should go without saying that the MACD indicator should never be used in isolation. This goes for any form of technical analysis.
I only use technical analysis to time the entry and exit points of my trade ideas, which I get from fundamental analysis. And even then, I use a combination of different indicators and apply discretion.
What do I mean by applying discretion?
I mean taking the underlying price action of the stock into account.
Is it at a point of support or resistance? Is it displaying a certain chart pattern? And what’s the long-term trend?
These are the questions you should ask before trading a crossover.
I illustrate this line of thinking with 2 approaches below.
1) Incorporate Chart Analysis
The first approach is to incorporate chart analysis into your decision making.
Chart analysis refers to finding areas of support and resistance on a chart, or chart patterns that give us some directional clues about where the share price is heading.
By complementing the MACD crossover with chart reading, we increase our likelihood of avoiding false signals.
For example, in the weekly chart of Tencent below, you will see that it spent almost 2 years trading in a sideways range.
As mentioned, this sort of market action doesn’t suit the MACD.
However, this is only true if you religiously trade every signal. On closer inspection, there were ways to “cherry-pick” profitable trades by incorporating chart analysis.
For example, the daily chart below highlights a bullish wedge pattern within the longer-term range.
It just so happened that the breakout from this wedge coincided with a MACD buy signal on the weekly chart. Moreover, this buy signal occurred on a support line, which gave us extra reason to be bullish.
The trick now is to get out at the right time. When a stock is range-bound, you shouldn’t wait for the next sell signal to do this. This will get you out too late.
Instead, you should sell at the next line of resistance – highlighted by the circle in this case.
Zooming out to the weekly chart, there were also clues about the circled buy signal – just before the share price broke out of its long-term range.
Firstly, you will notice that the histogram is flat right before the breakout. This reflects share price consolidation; something that usually precedes a breakout. More on this later though.
When we zoom in on the daily chart, you should see a bullish head and shoulders pattern.
Combining this with the buy signal, histogram, and range breakout, gave us a pretty good bullish indication.
Note, you don’t always have to enter a position when the MACD indicator tells you. Instead, you can use the MACD as one of many inputs to inform your directional view. In this example, we’re using the MACD crossover alongside 2 chart patterns and the histogram to achieve this.
2) “The Trend is Your Friend”
The second way to optimize the crossover strategy is by trading in the same direction as the longer-term trend.
This comprises of 2 steps:
- Establish the long-term trend from a longer-time-frame chart
- Enter positions in the same direction as this long-term trend on shorter-time-frame charts
The Path of Least Resistance
By doing so, we take advantage of what’s known as the “path of least resistance”. Put simply, this is the most likely direction of travel for a share price.
You can think of it like riding a wave. You want to swim in the same direction as the wave rather than fight against it.
To establish the long-term trend, we first need to zoom out on a longer-time-frame chart.
Continuing with the example of Tencent, you can see that the MACD generated a buy signal on the monthly chart just before the breakout we analysed earlier.
Knowing this tells us that the path of least resistance is up. Therefore, on the shorter-time-frame charts (weekly, daily), our bias should be towards trading buy signals.
The most obvious being the circled buy signal on the weekly chart from earlier.
Now, let’s apply the same line of thinking to the bull run from 2012-18.
On the monthly chart above, there were a couple of sell signals that might have taken you out of the stock temporarily. However, the majority of the time you had a buy signal.
Therefore, the long-term trend is bullish and the path of least resistance is up.
In the weekly chart below, you can see that the majority of buy signals were profitable, while the majority of sell signals were unprofitable (false signals).
This the point I’m trying to make: the trend is your friend!
When you find yourself in a bullish longer-term trend, it’s better to enter long positions at buy signals than to enter short positions at sell signals. And vice versa in a bearish trend.
MACD Crossover Takeaways
As you can see, there are multiple layers of analysis that go into using this MACD trading strategy.
But here are the main takeaways:
- Don’t blindly trade every crossover.
- Identify chart setups for directional guidance. Complement the MACD crossover with this chart analysis.
- Favour signals that mirror the longer-term trend.
MACD Divergence
Another common MACD trading strategy is the MACD divergence.
A MACD divergence occurs when the stock price and MACD trend in opposite directions. This acts as a leading indicator for a potential reversal in the share price.
In that respect, it is just like any other divergence indicator.
MACD Bullish Divergence
A MACD bullish divergence occurs when the MACD line makes higher lows at the same time that the share price makes lower lows.
The chart below shows this clearly. At the nadir of the stock market crash in 2008/09, the S&P 500 was making lower lows while the MACD line was making higher lows.
Turns out that this was one of the greatest trading opportunities of all time.
Check out my TC2000 review for another charting software capable of finding MACD divergences.
MACD Bearish Divergence
Similarly, a MACD bearish divergence occurs when the MACD line makes lower highs at the same time that the share price makes higher highs.
This indicates that bullish momentum is dwindling, and a potential bearish reversal is coming.
We can see a few instances of this in the same S&P 500 chart.
At the top of the market in 2007, you can that prices were making new highs while the MACD was making lower highs.
We all know what happened next…
MACD Histogram Trading Strategies
The MACD histogram is another, less common way to use the MACD indicator. However, it can be powerful if used correctly.
Remember, the histogram is just the difference between the MACD and signal lines.
Therefore, the further the MACD moves away from the signal line, the further the histogram moves away from the zero line.
Also, recall that the signal line is just the 9-period exponential moving average (EMA) of the MACD. As such, the MACD line is more sensitive to recent price moves.
Tying this all together, it follows that an explosive, short-term price movement will cause the MACD to diverge from the signal line, and the histogram to reach extended levels.
Conversely, when there’s low volatility in a stock price, the MACD and signal will stay close to one another, and the histogram will hover around the zero line.
Therefore, the histogram tells us whether:
- The share price is overbought/oversold and primed for a reversal – when the histogram is extended
- That it’s consolidating and ready for a breakout – when the histogram is flat
Histogram Reversal Trading Strategy
The histogram reversal strategy concerns the first of these scenarios. In other words, it’s an overbought/oversold indicator that signals potential reversals.
Too often, traders chase momentum and enter a position after a big move in either direction.
This is usually the exact moment they should be taking the opposite bet and trading a reversal.
While momentum trading has its time and place in the right conditions, the reality is that markets chop around in a range most of the time.
In these sorts of markets, crossover trading is futile because the MACD is a lagging indicator.
To use the MACD as a leading indicator, you should focus on extreme histogram levels and trade reversals. This means entering positions before a crossover occurs.
Incorporate Chart Patterns
To finesse this further, focus on extremes around prominent chart patterns – just like we did with the crossover strategy.
I’ll show you what I mean…
In the weekly chart of Apple below, you will see that in March 2020 the histogram reached extreme oversold levels and started forming a hump-shape (highlighted by the vertical line).
At the same time, the share price had support from the 50% Fibonacci retracement, which also coincided with the previous peak in the orange circle. This peak acts as a “pivot point”, which provides another level of support.
When an oversold condition occurs at points of support, instead of chasing the momentum and entering a short position, you should take a contrarian view and enter a long position.
Note how buying at the vertical line got you in sooner than waiting for the bullish crossover a few weeks later. This is why the histogram is a leading indicator when used correctly.
Here is another example in choppier price action.
Again, instead of chasing momentum and selling, the right thing to do was buy at the support line after the extreme move down.
The historical volatility indicator is another way to find potential reversal points like above.
Histogram Breakout Strategy
In contrast to the previous strategy, which looked for momentum reversal, this strategy looks for momentum breakouts.
To identify these opportunities, you simply need to find an area on a chart where the histogram has hugged the zero line for a while. As explained earlier, this means that there’s low volatility in the underlying price, which is what we tend to see right before an explosive move.
To increase the efficacy of this indicator, you should marry it together with chart analysis – just as we’ve done with every other strategy.
If we can find potential breakout points on a chart that coincide with this histogram pattern, we automatically increase its predictive power.
For example, in the Gold chart below, you will see how the histogram flattened (circled region) just before the price broke out of an ascending triangle pattern.
Zero Line Crossover Trading Strategy
The zero line crossover, or zero cross, strategy is based on either of the MACD or signal lines crossing the zero line.
If the MACD crosses the zero line from below, this generates a buy signal. If it crosses the zero line from above, this generates a sell signal. As with any MACD strategy, these shouldn’t be taken as hard-and-fast rules, but guidelines.
This is the slowest indicator of all those mentioned, which means it generates the fewest signals. While this also means less false signals, it means when they’re wrong, they’re wrong bad.
Therefore, you really want to avoid using this strategy in choppy markets.
The Bitcoin chart below shows this in action. The green arrows show where buy signals occur, and the red arrows show where sell signals occur.
As you can see, the delayed nature of this strategy is ill-suited to volatile price-action. The buy and sell signals occur too late after the reversal, so you end up buying high and selling low.
Where the zero cross strategy comes into its own, is detecting long, sweeping reversals.
As you can see in the chart below, the zero cross strategy is very good at keeping you in those long trends with low volatility.
RSI and MACD Trading Strategy
The final MACD trading strategy I want to show you is one that incorporates the relative strength index (RSI).
It assumes that you already know the basics of the RSI. So if you don’t, read this article on how to find oversold stocks with improving RSI.
There is a lot going on in the chart of the Chinese Yuan (CNH) below, so I’ve divided it into 4 sections. I will explain how the RSI and MACD work together in each case. The buy and sell signals on the chart represent MACD crossovers.
How to Use RSI and MACD Together Effectively
- At point 1, the last signal from the moving average convergence divergence indicator was a sell. Therefore, we know that a bearish trend is in place.
However, the real confirmation of this bearish trend came when the RSI broke below its long-term uptrend (highlighted by the vertical line and circle). Big RSI trend breaks like this are one of the best indicators of a structural trend-reversal.
Shortly after, the CNH price also broke below its own uptrend – further evidence that the bearish reversal had legs. - The chart setup at point 2 is a classic RSI bullish divergence, signalling a potential bullish reversal.
The MACD buy signal (bullish crossover) gave the perfect timing to trade this reversal. - Point 3 is just a mirror image point 2. Instead of bullish RSI divergence, there’s bearish divergence. And instead of a bullish MACD crossover to help you time the reversal, you have a bearish crossover.
- Point 4 is a combination of points 1 and 2. Firstly, you had bullish divergence in the RSI for over a year, signalling a bullish reversal at some point.
To help time this reversal, you had a bullish RSI trendline break which coincided with a bullish MACD crossover. Entering a long position at this point (vertical line) is working out pretty well so far.