EA-261 · Trend Following

Crossover_2EMA

This EA implements a dual EMA crossover trend-following strategy using the MQL5 Standard Library Expert framework. It generates buy signals when the fast EMA crosses above the slow EMA and sell signals on the opposite crossover. Position sizing is handled by a fixed lot money management module with no trailing stop applied.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsEMA
AuthorMetaQuotes Software Corp.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Blow-up risk: No blow-up pattern found

  • Has no stop loss or trailing stop

On its own this is not a typical blow-up pattern, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

This EA employs the classic dual Exponential Moving Average (EMA) crossover strategy as its core trading logic, representing a typical trend-following system. Entry conditions are a buy when the fast EMA (default period 12) crosses above the slow EMA (default period 24), and a sell on the opposite crossover. Exit conditions rely on the signal reversing via crossover since no trailing stop module is configured (TrailingNone), meaning positions are held until an opposing signal appears. Position sizing uses a fixed lot approach (CMoneyFixedLot) with a default lot size of 0.1 and a money management percentage of 10%. The strategy lacks explicit stop-loss and take-profit levels, depending entirely on signal reversal for position closure, which can lead to significant drawdowns during ranging markets. The overall architecture is built on the MQL5 Standard Library CExpert framework, offering high modularity with signal, trailing, and money management as independent components.

Strengths

  • Built on the MQL5 Standard Library framework with clear code structure, high modularity, and easy maintenance and extensibility
  • The dual EMA crossover logic is simple and intuitive, well-suited for trending markets, and facilitates straightforward backtesting and parameter optimization
  • Signal, trailing, and money management modules are independently decoupled, allowing easy replacement or upgrade of any single module

Weaknesses

  • No stop-loss or take-profit configured, leading to consecutive losses from frequent false signals during ranging markets
  • Lacks explicit new bar check (EveryTick=false helps but is insufficient), potentially opening duplicate positions within the same bar
  • Dual EMA crossover is inherently a lagging indicator, causing late entries that often coincide with trend exhaustion

Possible improvements

  • Add stop-loss and take-profit parameters, or at least enable a trailing stop module to limit per-trade losses
  • Add an ADX or volume filter to suppress false crossover signals during ranging or low-momentum markets

Risk assessment

Overall risk: Medium

  • No stop-loss or take-profit, allowing single-trade losses to grow unbounded
  • EMA crossovers frequently generate false signals in ranging markets, potentially causing consecutive open-close losses

Evaluation scores

Code quality4.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation1.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
Inp_Expert_TitleCrossover_2EMAExpert advisor title name
Inp_Signal_CrossEMA_FastPeriod12Fast EMA period
Inp_Signal_CrossEMA_SlowPeriod24Slow EMA period
Inp_Money_FixLot_Percent10.0Risk percentage for fixed lot money management
Inp_Money_FixLot_Lots0.1Fixed trading lot size

Similar Trend Following EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.