MACD Indicator - How to use MACD in Forex Trading

macd

The MACD indicator is one of the most popular technical analysis tools. Discover how the MACD indicator helps you “predict” market turning points, increase your winning rate, and identify explosive breakout before it really happens. 

What is the MACD Indicator

The Moving Average Convergence Divergence (MACD) is an oscillator type indicator that is widely used by traders for technical analysis (TA). MACD is a trend-following tool that utilizes moving averages to determine the momentum of a currency pair, stock, cryptocurrency, or another tradeable asset.

Developed by Gerald Appel in the late 1970s, the Moving Average Convergence Divergence indicator tracks pricing events that have already occurred and, thus, falls into the category of lagging indicators (which provide signals based on past price action or data). The MACD may be useful for measuring market momentum and possible price trends and is utilized by many traders to spot potential entry and exit points.

Before diving into the mechanisms of MACD, it is important to understand the concept of moving averages. A moving average (MA) is simply a line that represents the average value of previous data during a predefined period. In the context of financial markets, moving averages are among the most popular indicators for technical analysis (TA) and they can be divided into two different types: simple moving averages (SMAs) and exponential moving averages (EMAs). While the SMAs weight all data inputs equally, EMAs assign more importance to the most recent data values (newer price points).

Learn more about technical indicators with our online trading course for beginners and advanced traders. 

Source: Forex Trading MasterClass

How MACD works

The MACD indicator is generated by subtracting two exponential moving averages (EMAs) to create the main line (MACD line), which is then used to calculate another EMA that represents the signal line.

In addition, there is the MACD histogram, which is calculated based on the differences between those two lines. The histogram, along with the other two lines, fluctuates above and below a centerline, which is also known as the zero line.

Therefore, the MACD indicator consists of three elements moving around the zero line:

  • The MACD line (blue): helps determine upward or downward momentum (market trend). It is calculated by subtracting two exponential moving averages (EMA). 
  • The signal line (red): an EMA of the MACD line (usually 9-period EMA). The combined analysis of the signal line with the MACD line may be helpful in spotting potential reversals or entry and exit points.
  • Histogram (red and green): a graphical representation of the divergence and convergence of the MACD line and the signal line. In other words, the histogram is calculated based on the differences between the two lines.


macd line

MACD Calculation

The MACD line

In general, the exponential moving averages are measured according to the closing prices of an asset, and the periods used to calculate the two EMAs are usually set as 12 periods (faster) and 26 periods (slower). The period may be configured in different ways (minutes, hours, days, weeks, months), but this article will focus on daily settings. Still, the MACD indicator may be customized to accommodate different trading styles, including scalping, day trading, or swing trading.

Assuming the standard time ranges, the MACD line itself is calculated by subtracting the 26-day EMA from the 12-day EMA.

  • MACD line = 12d EMA - 26d EMA


As mentioned, the MACD line oscillates above and below the zero line, and this is what signals the centerline crossovers, telling traders when the 12-day and 26-day EMA are changing their relative position.

The signal line

By default, the signal line is calculated from a 9-day EMA of the main line and, as such, provides further insights into its previous movements.

  • Signal line = 9d EMA of MACD line


Although they are not always accurate, when the MACD line and signal line cross, these events are usually deemed as trend reversal signals, especially when they happen at the extremities of the MACD chart (far above or far below the zero line).

The MACD histogram

The histogram is nothing more than a visual record of the relative movements of the MACD line and the signal line. It is simply calculated by subtracting one from the other:

  • MACD histogram = MACD line - signal line


However, instead of adding a third moving line, the histogram is made of a bar graph, making it visually easier to read and interpret. Note that the histogram bars have nothing to do with the trading volume of the asset.

MACD settings

As discussed, the default settings for MACD is based on the 12, 26, and 9-period EMAs - hence MACD (12, 26, 9). However, some technical analysts and chartists change the periods as a way to create a more sensitive indicator. For example, MACD (5, 35, 5) is one that is often used in traditional forex market and stock markets along with longer timeframes, such as weekly or monthly charts. 

It is worth noting that due to the high volatility of some markets (e.g. cryptocurrency market), increasing the sensitivity of the MACD indicator may be risky because it will likely result in more false signals and misleading information.

The values of 12, 26, and 9 are the typical settings used with the MACD, though other values can be substituted depending on your trading strategy and goals.

For more in-depth knowledge about oscillators and momentum join our online trading course.

Source: Forex Trading MasterClass (Overview Chapter 5)

MACD Trading Signals

As its name implies, the 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 movements. The longer moving average (26-day) is slower and less reactive to price changes in the underlying security.

The MACD line 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 the 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 values indicate 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.

As the below image shows, the MACD measures momentum or trend strength by using the MACD line and zero line as reference points:

  • When the MACD line crosses ABOVE the zero line, this signals an UPTREND
  • When the MACD line crosses BELOW the zero line, this signals a DOWNTREND


In addition, the MACD signals buy or sell orders which are given when the two MACD lines cross over as outlined below:

  • When the MACD line crosses ABOVE the signal line, traders use this as a BUY indication
  • When the MACD line crosses BELOW the signal line, traders use this as a SELL indication
     

macd
 

MACD Centerline Crossover

Centerline crossovers are the next most common MACD signals. A bullish centerline crossover occurs when the MACD Line moves above the zero line to turn positive. This happens when the 12-day EMA of the underlying security moves above the 26-day EMA. A bearish centerline crossover occurs when the MACD moves below the zero line to turn negative. This happens when the 12-day EMA moves below the 26-day EMA.

Centerline crossovers can last a few days or a few months, depending on the strength of the trend. The MACD will remain positive as long as there is a sustained uptrend. The MACD will remain negative when there is a sustained downtrend. The next chart shows a stock with at least four centerline crosses in nine months. The resulting signals worked well because strong trends emerged with these centerline crossovers.

MACD Divergence

Divergences form when the MACD diverges from the price action of the underlying security. A bullish divergence forms when a security records a lower low and the MACD forms a higher low. The lower low in the security affirms the current downtrend, but the higher low in the MACD shows less downside momentum. Despite decreasing, downside momentum is still outpacing upside momentum as long as the MACD remains in negative territory. Slowing downside momentum can sometimes foreshadow a trend reversal or a sizable rally.

A bearish divergence forms when a security records a higher high and the MACD line forms a lower high. The higher high in the security is normal for an uptrend, but the lower high in the MACD shows less upside momentum. Even though upside momentum may be less, upside momentum is still outpacing downside momentum as long as the MACD is positive. Waning upward momentum can sometimes foreshadow a trend reversal or sizable decline.

Divergences should be taken with caution. Bearish divergences are commonplace in a strong uptrend, while bullish divergences occur often in a strong downtrend. Yes, you read that right. Uptrends often start with a strong advance that produces a surge in upside momentum (MACD). Even though the uptrend continues, it continues at a slower pace that causes the MACD to decline from its highs. Upside momentum may not be as strong, but it will continue to outpace downside momentum as long as the MACD line is above zero. The opposite occurs at the beginning of a strong downtrend.

MACD Limitations

The MACD indicator is considered to work best in trending markets. This limits its use for traders depending on their trading strategies. For example, range-bound/consolidating markets will generally give flawed signals when using the MACD. Traders will need to truly understand the MACD as well as when to employ the indicator for optimal use. Novice traders may find this indicator difficult to use initially, which is why going through basic moving average and EMA fundamentals will benefit traders who are looking to make use of the MACD indicator.

The variations that can be implemented with the MACD indicator are almost infinite which makes it very personal to the trader. This subjective nature of the MACD will mean that results differ from trader to trader which takes away any consistency. Traders will need to follow a basic outline when using the MACD:

  • Selecting EMA parameters
  • Using an appropriate time frame, as MACD may function differently across time frames
     

Setting up the MACD in MetaTrader 4/5

This guide shows you how to set up the moving average convergence divergence (MACD) indicator in MetaTrader 4/5.

Add the MACD and set the parameters of this indicator

  • Click Insert and move your mouse over Indicators and Trend
  • Click MACD

macd mt4

Setting the common parameters

After you have completed the step above, the settings menu appears.

macd mt4

Most indicators can be controlled by several common parameters.

There are two types of parameters:

  • Calculations of the indicator: e.g. the number of time periods used for the MACD (you do not need to worry too much about this in the beginning)
  • Visuals of an indicator: e.g. how it will look, the color and thickness of the lines, etc.
     

The parameter menu appears again where you can change the indicator.

How to change the MACD settings at a later time

To change the settings of the MACD indicator directly on the chart at a later date:

  • Right-click the MACD - you will have to be exactly on the line of the indicator to get the options menu.
  • Choose MACD-2 (13,17,9) - the numbers 13, 17 and 9 refer to the number of time periods the indicator bases its calculations on and you can change these depending on your preference.
     

How to delete the MACD indicator

To delete MACD:

  • Right-click the indicator that you want to delete - you will have to be exactly on the line of the indicator to get the menu shown below
  • Click Delete Indicator
     

Final words about MACD indicator

The MACD indicator is special because it brings together momentum and trend in one indicator. 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. MACD(5,35,5) is more sensitive than MACD(12,26,9) and might be better suited for weekly charts. 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.

The 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, the MACD does not have any upper or lower limits to bind its movement. During sharp moves, the MACD can continue to over-extend beyond its historical extremes.

Finally, remember that the MACD line is calculated using the actual difference between two moving averages. This means MACD values are dependent on the price of the underlying security. The MACD values for $20 stocks may range from -1.5 to 1.5, while the MACD values for $100 may range from -10 to +10. It is not possible to compare MACD values for a group of securities with varying prices. 

Learn about other oscillators and forex indicators to enhance your trading for both beginner and experienced traders:


Technical traders have different styles and forex trading strategies. Explore these thoroughly to find out if this type of analysis suits your personality. If you are just starting out on your trading journey it is essential to understand the basics of forex trading in our new forex course.

>> Learn how to Master the MACD Indicator

forex trading masterclass

MACD - https://cmtassociation.org/kb/macd/

MACD (Moving Average Convergence/Divergence Oscillator) - https://school.stockcharts.com/doku.php?id=technical_indicators:moving_average_convergence_divergence_macd 

Recent MACD Bullish Crosses - https://finance.yahoo.com/u/yahoo-finance/watchlists/macd-bullish-cross/

Moving Average Convergence Divergence (MACD) Definition - https://www.investopedia.com/terms/m/macd.asp

MACD/Divergence Trading: How to Build a Profitable Trading System Using Moving Average Convergence-Divergence - https://www.amazon.com/MACD-Divergence-Trading-Profitable-Convergence-Divergence-ebook/dp/B00JST8VLE

 

 

 

Categories:  Education