2021-02-16
2021-02-16
Moving Average Convergence Divergence (MACD) Indicator in Forex ExplainedMikhail Hypov
Dear friends! Today we will look at one of the most popular indicators – the MACD. This tool is easy to use and is often part of successful trading systems. Today I will tell you how to use MACD, how is MACD calculated and interpreted, and what sort of signals it gives. You will also learn how to set up and use the MACD indicator. We will look at examples of real trading on Forex, stock and metals markets.
The article covers the following subjects:
What does MACD stand for? The full name of the indicator is Moving Average Convergence / Divergence. The name is actually a comprehensive description of the MACD forex indicator.
It shows the degree of divergence of the MAs. Two EMAs are used for the MACD calculation: fast and slow. Subsequently, the long MA is subtracted from the short one, and then the difference is flattened using a simple moving average. As a result, traders see only two curves – the MACD line and a signal line. The difference between the two serves as the basis for trading signals.
The MACD oscillator was created by the American analyst Gerald Appel in 1979. Appel initially planned to use it to analyze the securities market. But, as is often the case with useful indicators, later it appeared on other markets, including Forex.
The Moving Average Convergence Divergence indicator is universal in its application. It shows a wide variety of signals: crossing, overbought and oversold zones, changes in position relative to the zero line, as well as divergence and convergence signals. The tool performs well with almost all exchange instruments.
The only limitation is the timeframe. It is not recommended to set it below H1, since the MACD indicator readings will be affected by price noise - natural market volatility.
The MACD line of the indicator is a graphical result of calculating the difference between the fast and slow EMA. In the original version, it was displayed as a curve. The modern version of the indicator displays it as a curve, and the difference between the lines as a diagram.
The MACD formula is as follows:
Where:
The signal (slow) line is a simple MA of the MACD line. Here is its formula:
Manually calculating the values is long and tedious, especially if you are calculating the exponential moving average manually. It is much easier to download the MACD indicator and immediately do technical analysis.
By the way, this technical analysis tool is available by default both in [LiteForex online terminal][1] and in MT4.
An alternative option is an automated calculation in an Excel table. [Here][2] you can download the MACD indicator as a template or use the table online. If you have never worked with a Google spreadsheet, you can find a quick guide [here][3] using the Bollinger Bands calculator as an example.
I tried to make the calculator as easy to use as possible.
For the calculation, you need to fill in the closing price values in column “B” (highlighted in blue), and enter the period for calculating the moving averages of the signal line and the Moving Average Convergence Divergence itself (highlighted in red). All the cells in pink can be filled manually. Blue cells are calculated automatically and should be left alone. Text fields with reference information are marked with yellow.
Column B is already pre-filled with random numbers. To use the calculator, change these values to your own.
I left about 70 lines for entering price data, but you can copy the formulas of the last line and stretch the table lower.
Important! Column “B” does not have to be filled in full. However, for correct calculation you need to fill at least twice as many cells as the largest value of the moving average period. For example, in the figure above, the slowest EMA has the largest period of 24, which means you need to fill in 50 cells for correct calculation. Remember that the price values are filled in order from top to bottom - from the earliest to the most recent.
The indicator calculates the result automatically based on the values you entered. It is located on the right side of the table along with the price chart. The diagram is based on the last 30 filled cells and allows you to perform an analysis similar to the one in the trading terminal.
Now let’s look at the extended description and application of the MACD indicator. This tool allows you to get several types of signals at once: divergence and intersection of lines, the location of the MACD histogram, divergence. I will tell you in detail how to detect the signals and interpret them.
Let’s figure out how to read MACD chart and its signals. Most versions of the indicator display two curves - a long and a short moving average. One shows the long-term market trend, and the other shows what is happening in the market now.
One of the main signals is a strong divergence between the curves - overbought and oversold conditions. This situation is a sign of a trend reversal. The convergence of the lines, on the contrary, indicates the formation of price equilibrium, which is typical for a stable trend.
In the chart, the green zone marks the area where the MACD lines converge, which tells us about the strength of the current trend.
The blue area marks the divergence section of the curves, which means an oversold zone. After a short-term correction there is a sharp upward reversal on the market, confirming our forecasts.
The fast line is more prone to price fluctuations. When the trend ends, it crosses the signal line.
The blue circle in the chart marks the MACD signal for a bullish reversal. The blue fast line crosses the slow red line upwards. Note that the reversal signal appeared with a slight delay.
The red circle marks the sign of a bearish reversal. The signal curve crosses the fast MA from top to bottom. The downward movement has already begun.
Crossovers are considered a frequent MACD signal. There are two options for a MACD crossover:
Let’s consider various options for crossing through the examples on Forex, stock and cryptocurrency markets.
In the [EURUSD][4] chart above, the blue circle marks the moment when the blue fast MACD curve crosses the slow line from the bottom up. As expected, after this signal appeared, the price turned upwards.
You can see another bullish reversal scenario in the [S&P 500][5] chart. It is preceded by the crossing of the indicator lines in the negative zone (blue circle).
Using [BTCUSD][6] as an example, let us consider a bearish reversal. In the area marked with a blue circle, the intersection of the fast and slow lines is clearly observed. At that moment, the price has already started falling in the chart. The crossover of the moving average confirmed the beginning reversal.
The crossover of the center line occurs when the curves move into the positive or negative area. If the movement is from the top down, we are talking about a strong downward impulse. And if the price moves from the bottom up – this is an upward impulse.
In the [EURUSD][4] chart, a blue circle marks the crossover of the central line with moving averages of the MACD. This phenomenon occurs during the development of a stable directional movement and is a trend signal.
The MACD histogram displays the relative position of the EMA. In other words, it is a graphical representation of the average fluctuations in the price value.
When trading with the MACD indicator, first you should take into account the position of the columns relative to zero. If they are above 0, the trend is bullish, if below - bearish. The height of the bars is proportional to the distance between the curves, which opens up another opportunity for us to identify how overbought and oversold the zone is.
We should also take into account the slope, which shows how the balance of forces is changing:
In the above chart, the colored areas mark different behavioral patterns of the MACD histogram. A positive trend is observed in the green zone, both in the MACD histogram and in the price chart. The blue area looks like a flat, but price fluctuations occur at this time. However, they do not have sufficient strength to result in any meaningful movement. Finally, the red zone in the MACD histogram represents a strengthening bearish trend. A powerful downward impulse corresponds to it.
Divergence is considered a leading signal. It shows the divergence of the lines connecting the extremes of the price chart and indicator values. For MACD, divergence can be tracked both by moving averages and by the readings of the indicator histogram.
There are three types of divergence:
The picture above shows all three types. Please remember the signals for each one. I wrote more about this signal in a large review with a detailed description of each type of signal for the MACD and other indicators. You can find the article here.
If you are confused and have problems studying all three types, I recommend remembering the signs of only one type - classic divergence. Only the classical divergence is a signal of a trend reversal! If you see divergence, but the signs are different, then most likely such a signal indicates the continuation of the trend.
You can find a detailed description of the signs for all types of divergences in my article “Divergence and convergence on Forex. What it is and how to use it correctly”.
Here I will just briefly remind you how to use the MACD divergence indicator using the example of a regular divergence.
In the price chart above, the blue line marks local lows, each of which is lower than the previous one. Similarly, in the MACD chart, I connected the lows of the chart with a blue line. Since the line is directed downward in the price chart and upward in the indicator, and the signal itself occurs within the downward trend, we can talk about a bullish divergence, i.e. change from a bearish trend to a bullish one.
The same principle works for a classic bearish divergence, only we look for a divergence at the highs, and the signal itself must be within a bullish trend.
Traders use a wide variety of MACD strategies. Here are some of them:
The easiest way to use MACD in Forex is trend following. This method can be used even by beginners taking their first steps in trading:
We will place our stop loss just below the nearest local extremum. You can close the position by indicator signals or by setting a take profit at a distance of one or two stop losses.
Let’s look at this strategy using the example of the [XAUUSD][7].
In the blue circle, we see the fast red curve crossing the slow purple one upwards. Immediately after this, the MACD histogram moves to the positive area. The presence of both signals of the strategy allows us to open a long position at the close of the candle (blue line). Set the stop loss just below the previous local low.
As long as the MACD histogram is growing, we can be sure of the strength of the bullish trend. A little later, a bar is formed, marked with a red circle. It is lower than the previous one, which indicates a decrease in buyers’ activity.
You may have noticed another alert of the MACD indicator that I mentioned - a noticeable divergence of the indicator curves. It indicates an overbought zone and possible trend reversal. Therefore, when the candlestick closes at the level of the green line, where there is a large divergence between the MACD curves and a decreasing bar, we take the profit.
Alternatively, you can let the trade close by take profit, which, depending on the risk management, can be equal to one or two distances from the position opening level to the stop loss.
This is a more complex strategy for the MACD indicator. It is based on classic divergence signals when:
In the first case, a bearish divergence occurs prior to a market reversal. After the MACD histogram crosses the zero line, an opportunity opens up to enter the market with a sell position. In the second case, a bullish divergence occurs. It creates an opportunity to enter the market to buy.
The [BTCUSD][6] chart above shows a bearish divergence marked with diagonal blue lines.
Important! In a downtrend we compare lows, and in an uptrend - highs.
The entry point is the moment the first green bar appears on the diagram. At the close of the candle, open a long position (blue horizontal line). Set the stop loss just below the previous low. Let the order close by take profit equal to two stop losses (green line).
Using the example of the American stock exchange [S&P 500][5] index, I will show you an alternative trading option. We define bullish divergence by the price highs and the fast line. As you can see, the price is updating highs while the MACD chart is moving down, creating an indication that the upward movement is nearing completion.
When the chart enters the negative zone, open an order (blue horizontal line). Set the stop order just above the high. Exit from the market a little later, when the next red bar of the chart is formed slightly below the previous one (green line).
The use of the MACD as an oscillator for trading on extreme values is a common practice among traders. This strategy is based on the following rules:
The rules for setting stop losses are the same as in the previous examples. Exit the market when the MACD histogram starts moving in the opposite direction.
In the [EURJPY][8] chart, the blue circle marks the moment when the histogram reaches its high values. Then the decline begins. Open a short position (blue line) on the first bar that is shorter than the previous one. Set the stop loss just above the previous high (red line).
Next, we closely monitor the behavior of the MACD histogram, which, amid a fall in price, goes into a negative zone and forms a new bottom (red circle). We exit from the market after the formation of the lower red bar (green line).
One of the basic rules is trading on the side of the market. The MACD is great for identifying large stable trends. Choosing the right side of the market is easy:
Let’s try to identify long-term trends in the daily [EURUSD][4] chart. Inside the blue area, there is positive growth of the MACD histogram. Therefore, all these days you should give priority to long positions. Then a decline is observed in the red area. When the MACD histogram turns to the negative side on smaller timeframes, it is recommended to open only short positions.
One of the advantages of the MACD is its versatility. Originally designed for stock market analysis, it has proven to be effective in other markets. Modern traders actively use the MACD to trade currency pairs, precious metals, energy, stocks, futures, and even cryptocurrencies. Below I will talk about trading the S&P 500, gold, and the [EURUSD][4].
For the [S&P 500][5] index, the most profitable strategy is to trade at the crossing while taking into account the position of the histogram. Buy and hold the position after the fast line is crossed from the bottom up and the MACD histogram moves into the positive zone. Sell after the curve of the signal line is crossed from the top down and the MACD histogram moves into the negative zone.
The blue circle in the four-hour [S&P 500][5] chart marks the moment when the signal curve crosses the MACD line from the bottom up and the MACD histogram moves into the positive zone. This is a signal to open a long position. We enter the market on the first positive bar of the MACD histogram (blue line). Stop loss should be placed below the previous low.
By analogy with the previous examples, the exit from the market should be carried out at the moment when the next column forms below its predecessor (green circle). However, in this case, the profit will be small (green line).
Alternatively, we can use an additional condition - changing the slope of the fast line. On the chart, this signal appears a little later in the area of the purple circle. At this point, we close the position, making a much larger profit.
You can trade gold using the same system as the [S&P 500][5], but with one condition. It’s opening extremely long positions. The trading history shows low effectiveness of selling at crossings.
The blue oval marks the area in the chart where the red fast line crosses the slow one from the bottom up. Open the position the moment the MACD histogram moves into the positive zone (blue line). The red line marks the stop loss located just below the nearest low.
During the development of the trend, the MACD histogram indicators are declining, but the MACD curve continues to move up. Similar to the previous example, we are waiting for a double signal. It happens a little later (green oval), when the curve reverses down and another lower bar is formed. At this moment we exit the market (green line).
For the US dollar, the effectiveness of the MACD trading strategy is medium. It can and will be profitable, but you should not count on consistently large profits.
As in the previous examples, we open a long position (blue line) at the crossing of the curves and the MACD histogram moving to the positive zone (blue oval), and set the stop order below the low (red line). Then we are waiting for the signal expressed as the simultaneous decline in the histogram and signs of a reversal of the MACD line. This occurs within the green oval. We take the profit at the level of the green line.
It is generally accepted that the optimal MACD settings are as follows: 12, 26, 9. They are best suited for hourly charts. But such settings work well on any timeframes close to H1. That is why they are set by default on almost all terminals.
Here’s what these parameters mean:
Various charts from M1 to H1 can be used for intraday trading. We’ve covered H1 and similar timeframes above, so now we will consider the scalping settings.
MACD indicator settings 1 min:
These settings of the MACD indicator for the M1 timeframe can be applied either separately or together if the trading strategy involves the use of several charts at once. The first option of parameters is the most sensitive to price fluctuations, and the last one is the least sensitive. Please note that all three types of settings do not involve the flattening of the signal line.
Use parameters 21, 31, 1 for 5 and 15 minutes. But for trading in half- hour charts, it is better to choose the standard settings 12, 26, 9.
The MACD Color is considered the best version. Its main advantage is the easy-to-read histogram. By default, when the columns are in the positive zone, they are colored green, and when in the negative zone, they are colored red.
The MACD Color indicator for MT4 can be downloaded [here]9.
Here is a link to the version for MT5:
And if you want to try trading in automatic mode, I recommend that you check out the MACD Sample Expert Advisor built into MT4. By default, it already contains the optimal parameters for trading in the one- and four-hour timeframes. If you want to adapt it to other charts, even beginners will be able to figure out the settings.
The MACD indicator can be used not only for traditional technical analysis, but also as one of the tools for selecting assets for investment. How do you find the right trading instrument to trade?
You can take advantage of stock screeners - analytical platforms on which information about securities is collected. They allow you to filter assets by dozens of parameters. A good selection of such programs can be found in the article “[Stock Screener - Your Guide to the Stock Markets of the World.][10]”
There you will find such popular monitoring platforms as:
However, all these services have one drawback - they cannot filter by technical indicators. The most popular screener that can do this is [tradingview.com][15]. Its great advantage is the ability to work not only with stocks, but also with cryptocurrencies and the foreign exchange market.
In order to filter by MACD indicators, select the required screener and click on the rightmost button with three dots.
Type in “macd” in the search box and tick the boxes that appear. Two new columns will be added to the table, reflecting the value of the MACD parameters and even a buy or sell signal for these indicators. Another advantage of the [tradingview][15] screener is the option to set alerts, a set of pre-configured templates for filtering, and the ability to create your own.
There is another good screener on the [www.investing.com][16] portal. But it only works for the stock market.
You can find it in the main menu of the website. To do this, find the “Tools” tab and click on the “Stock Screener” link.
Then, in the window that opens, pay attention to the menu in the upper left corner. Select the item “Technical indicators”, then “MACD” and specify the parameters in the window on the right. For example, by using the sliders I indicated the range of values to filter the quotes of securities. In the lower window, the service showed a selection of stocks matching the parameters.
As other technical analysis tools, MACD has its own strengths and weaknesses. Below I will compare it with popular technical tools, describe the advantages and disadvantages, and also touch on the topic of combining indicators.
While the MACD shows the difference between the moving averages, the RSI works in a slightly different way. It shows the flattened difference between past and current price fluctuations, or simply overbought and oversold levels. MACD is good on long timeframes and RSI is good on short ones.
These two tools often provide complementary information and therefore are often used together in some trading strategies. There is even a MACD RSI indicator - the most accurate scalper that I have come across. You can download it here:
If you want to learn more about the RSI and apply it together with MACD, I recommend reading the article “[RSI Relative Strength Index Indicator][17]“.
Compared to Stochastic, MACD is considered more useful in trending markets. At the same time, the oscillator shows the best results when the market is moving sideways. To get a more universal trading system that does not depend on price behavior, you can use two instruments at once in different periods or combined when one instrument filters the readings of the other.
You can learn more about Stochastic in the article “[Stochastic Oscillator: How to Use the Stochastic Indicator in Forex Trading][18]“.
It is naive to think that MACD is the perfect indicator. Like other technical analysis tools, it has a number of limitations:
And here is what traders think about the limits of the MACD.
How to set up the MACD indicator?
For H1 and similar timeframes, the optimal settings are 12, 26, 9. Many traders also use them for trading on daily charts. If you want to trade on minimal timeframes, for 5 and 15 minutes it is recommended to use parameters 21, 31, 1. Three types of settings are considered effective on the 1-minute timeframe: 13, 21, 1; 21, 34, 1 and 31, 144, 1. Many traders add three indicators with the above parameters to the chart to improve the accuracy of their predictions.
The MACD was developed several decades ago. However, this indicator is still capable of giving quite reliable trading signals when used in trend strategies. The MACD is especially effective when trading on a long-term horizon and when used on large timeframes. But traders who make money on short-term trades may have problems with the quality of signals.
It is also important that the MACD is a popular basis for developing your own indicators (example: MACD-RSI) and trading strategies. I wrote about one of these more than two years ago: [SK-FX - a high precision strategy][19].
Such popularity confirms the important role of the MACD indicator in technical analysis and makes it mandatory to study for everyone who is just starting to master the trading craft. For the best learning efficiency, I recommend that you go to the [terminal][20] right now and try the MACD yourself. If you have just started your trading path, trading on a demo account [without registration][20] will help you avoid losses!
That’s it for today. Follow our [LiteForex blog][21]! Together with other cool authors, we post a lot of useful content. You will always find something interesting.
Good luck!
Yours faithfully,
Mikhail @Hypov
P.S. Did you like my article? Share it in social networks: it will be the best “thank you” :)
Ask me questions and comment below. I’ll be glad to answer your questions and give necessary explanations.
Useful links:
The content of this article reflects the author’s opinion and does not necessarily reflect the official position of LiteForex. The material published on this page is provided for informational purposes only and should not be considered as the provision of investment advice for the purposes of Directive 2004/39/EC.
Rate this article:
{{value}}
( {{count}} {{title}} )