The Moving Average Convergence Divergence (MACD) is a lagging (trend-following) momentum indicator demonstrating the relationship between two moving averages of an asset’s price.
This technical indicator draws on two particular moving averages: the fast EMA (exponential moving average) and the slow EMA. Specifically, the MACD subtracts the slow EMA from the fast EMA to determine whether the momentum of a trend is increasing or decreasing.
The default and typical value for the fast EMA is 12 days and the default and typical value for the slow EMA is 26 days. The 12-day EMA is called fast because it is based on shorter-term trends and thus its value changes more quickly. The 26-day EMA is called slow because it is based on longer-term trends and thus its value changes more gradually.
When looking at an MACD chart, there are two main lines to look at: the MACD line (usually blue) and the signal/trigger line (usually orange). The MACD line plots the difference between the slow EMA and the fast EMA. The signal line plots an EMA (usually the 9-day EMA) of the MACD.
Traders often look at the relationship between these two lines in order to determine buy or sell signals. When the MACD line crosses above the signal/trigger line, traders see that as a potential cue to buy and call the market bullish. The market is considered bearish when the MACD line crosses below the signal line, a potential indication to sell. These types of signals are called crossovers.
Included in an MACD chart is also a histogram plotting the difference between the MACD and its EMA plotted as the signal/trigger line (usually its 9-day EMA). The histogram looks like a bar graph, only it goes both above and below the zero line, also known as the centerline. When the MACD is above its signal/trigger line (often its 9-day EMA), the histogram is positive/above zero and the market is considered bullish. When the MACD is below its signal/trigger line, the histogram is negative/below zero and the market is considered bearish.
The histogram can also be read as a momentum indicator. Prices in fluctuation are constantly reverberating between extremes, though for the most part staying within the same range. When a histogram’s value is far from the centerline/zero line it can indicate strong momentum in one direction or another. A highly positive histogram could confirm the strength of a bullish momentum and a plunging low that of a bearish momentum. However, momentum can change from instance to instance, often moving based on more qualitative changes, or fundamental indicators.
Because the value of things change through time due to significant events, momentum in a particular direction does not guarantee the continuation of a trend. What goes up must (or usually does) come down, or at least levels off to a plateau based on demand.
The MACD chart can also be used to determine if an asset is overbought or oversold. When the MACD line is diverging from the signal line while above it, traders read this as the market price overextending or as the asset being overbought, a potential indication that it may go back down soon. When the MACD is diverging from the signal line while below it, it means the market price is undervalued or that the asset is oversold, indicating that it (the MACD line) may go back up soon.
There are also different types of divergences that can be used as indicators. For example, a bullish divergence is when an asset records a lower low on the candlestick chart relative to the prior lows but the MACD records a higher low on the MACD chart relative to the prior lows. This indicates that the downward momentum of the asset is slowing. As you may have guessed, the opposite is called a bearish divergence. A bearish divergence occurs when an asset records a higher high on the candlestick chart relative to the prior highs but the MACD records a lower high on the MACD chart relative to the prior highs, indicating the slowdown of upward momentum. Bullish and bearish divergences can foreshadow the reversal and/or decline of a trend.
MACD parameters are typically set and shown using a particular formula of three numbers with commas between them. The first number signifies the number of periods used to calculate the fast moving average, the second stands for the number of periods used to calculate the slow moving average, and the third is the number of periods used to calculate the moving average that forms the signal/trigger line (calculated as the difference between the fast and slow moving averages). The most common MACD parameters are “12, 26, 9”, and the periods of time these often stand for are in days, meaning a 12-day fast moving average, 26-day slow moving average, and 9-day moving average of the difference between the fast and slow moving averages.
You can trade using MACD manually on several platforms, and automate your trades based on MACD using Capitalise. Capitalise is a platform that is redefining trading automation, empowering you to automate your own unique trading plans using natural language. You simply write if-then strategies in plain English and Capitalise monitors the market and executes your trades from entry to exit.
In order to use MACD in a strategy in Capitalise, type “If the MACD Line”, and a widget will pop up above “the MACD Line” with fields to fill out. Next to “Fast”, type the number of periods you want to use to calculate the fast moving average. Next to “Slow”, type the number of periods you want to use to calculate the slow moving average. Next to “Signal”, enter the number of periods you want to use to calculate the signal/trigger line (plots the moving average of the difference between the faster and slower moving averages). Next to “BarPeriod”, you have the choice to enter the period of time you want your moving averages to be calculated from, with options ranging from 1m (1 minute) to Day (1 day). In “BarPrice”, you choose which price within the period of time you specify you want to be used in the calculations. “Close” means the closing price and is typical here but you can also choose the Open, High, and Low of the period.
Once you’ve entered all this information in, press the “OK” button within the widget and you can move on to describing the rest of your strategy, including what position you want the MACD Line to be in or what movement you want it to take relative to the signal line and then the action you want taken once that position or movement is met.
Here's an example of a MACD-dependent strategy you can create with Capitalise. Here we are using the crossing above indicator, which can be used as the only condition or paired with as many other conditions as you would like to add.
MACD is an advanced trading tool that can give traders excellent insight into when and how to enter and exit trading positions.
Please note that the examples we provided here are purely for the purposes of illustrating how to use MACD and are not in any way to be taken as trading advice. This content is intended for information and educational purposes only and should not be considered investment advice or investment recommendation. Past performance is not an indication of future results. Read more here