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 5 Expert Advisor | Simple EMA Cross EA with SL/TP and Magic Number | MQL5 Code

Discover expert developed MetaTrader tools that can complement professional solutions.

Image for Simple EMA Cross EA with SL/TP and Magic NumberThis Expert Advisor implements a classic moving average crossover strategy. It opens a buy position when the fast EMA crosses above the slow EMA, and a sell position when the fast EMA crosses below the slow EMA. Signals are evaluated on each new candle close to avoid duplicate trades within the same bar.

Input parameters:

  • Fast EMA period (default: 9)
  • Slow EMA period (default: 21)
  • Stop Loss in points (default: 300, set to 0 to disable)
  • Take Profit in points (default: 600, set to 0 to disable)
  • Fixed lot size (default: 0.10)
  • Magic Number (unique identifier for trades opened by this EA)

Grid trading done right – try the robust Grid Expert Advisor for controlled risk. Details here.

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

74135

Best MetaTrader Indicators + Profitable Expert Advisors