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 Expert Advisor | Viral MACD Strategy (3.5M+ Views) — Recreated and Automated


This Expert Advisor is a recreation of a popular MACD-based strategy that gained attention for its simplicity and claimed effectiveness across markets. It has been automated in MQL4 so you can independently test and validate its logic.

🎯 Core Features:

  • MACD crossover logic (fast 12, slow 26, signal 9)

  • Trend filtering with 200-period moving average

  • Support/resistance validation

  • Flexible signal matching with SignalValidity  parameter

  • Adjustable stop loss placement

  • Configurable lot size

📌 Strategy Rules:

  • Buy condition:

    • MACD line crosses above the signal line

    • Both lines below zero

    • Price is above 200-period MA

    • Price recently touched a support level

  • Sell condition:

    • MACD line crosses below the signal line

    • Both lines above zero

    • Price is below 200-period MA

    • Price recently touched a resistance level

🔁 Signals don't have to occur on the exact same bar — the SignalValidity input allows a small delay between conditions to capture setups more realistically.

🛠 Customization:

  • Lotsize : trade volume

  • SLPointDistanceFromMA : how far the stop loss is placed from the MA

  • SignalValidity : candle tolerance between S/R touch and MACD signal

📌 Note:
The EA uses a custom support/resistance indicator ( Box.mq4 ), which must be present in the Indicators folder for proper execution.

MetaTrader Experts, Indicators, Scripts and Libraries

MetaTrader Experts, Indicators, Scripts and Libraries


62000

Best MetaTrader Indicators + Profitable Expert Advisors