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
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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
Parameters
| Parameter | Default | Description |
|---|---|---|
Inp_Expert_Title | Crossover_2EMA | Expert advisor title name |
Inp_Signal_CrossEMA_FastPeriod | 12 | Fast EMA period |
Inp_Signal_CrossEMA_SlowPeriod | 24 | Slow EMA period |
Inp_Money_FixLot_Percent | 10.0 | Risk percentage for fixed lot money management |
Inp_Money_FixLot_Lots | 0.1 | Fixed trading lot size |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.