Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 4 Indicators | Moving Average Convergence Divergence, MACD | MQL5 Release

Discover expert developed MetaTrader tools that can complement professional solutions.

Image for Moving Average Convergence Divergence, MACD
Divergence

An indication that an end to the current trend may be near occurs when the MACD diverges from the security. A bullish divergence occurs when the Moving Average Convergence/Divergence indicator is making new highs while prices fail to reach new highs. A bearish divergence occurs when the MACD is making new lows while prices fail to reach new lows. Both of these divergences are most significantwhen they occur at relatively overbought/oversold levels.

Calculation of MACD

The MACD is calculated by subtracting the value of a 26-period exponential moving average from a 12-period exponential moving average. A 9-period dotted simple moving average of the MACD (the signal line) is then plotted on top of the MACD.

MACD = EMA(CLOSE, 12)-EMA(CLOSE, 26)

SIGNAL = SMA(MACD, 9)

Watch in-depth trading tutorials and EA reviews on the RobotFX YouTube channel. Subscribe for free tips.

Where:
EMA — the Exponential Moving Average;
SMA — the Simple Moving Average;
SIGNAL — the signal line of the indicator.


Technical Indicator Description

Full description of MACD is available in the Technical analysis: Moving Average Convergence/Divergence

Level up your trading with professional RobotFX expert advisors and indicators. Visit robotfx.org for proven MT4/MT5 tools.

7774

Best MetaTrader Indicators + Profitable Expert Advisors