The formula to calculate the MACD is:
\[ MACD = 12EMA - 26EMA \]
Where:
MACD, short for moving average convergence divergence, is a metric or indicator used in finance that shows the relationship between the moving averages of a security. The MACD is considered a trend-following momentum indicator. The moving averages used are the 12-period and 26-period exponential averages.
Example 1:
Using the formula:
\[ MACD = 50 - 45 = 5 \]
Example 2:
Using the formula:
\[ MACD = 30 - 35 = -5 \]