DoubleMA Crossover EA
This EA implements a dual moving average crossover strategy, generating buy signals when a fast MA crosses above a slow MA and sell signals on the reverse crossover. It automates trade entry and exit based on these crossover events, making it a classic systematic trend-following system. The EA typically includes configurable MA periods, lot sizing, and optional stop-loss/take-profit parameters.
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 | -6.74% | -5.88% | 7.75% | 118 | 41.90% | -1.50 | -0.87 | 7 | −$5.47 | Reliable |
| GBPUSD | +3.14% | +2.72% | 4.41% | 119 | 53.40% | 0.59 | 0.71 | 6 | +$2.86 | Reliable |
| USDJPY | +5.83% | +5.04% | 5.63% | 121 | 55.40% | 1.07 | 1.04 | 5 | +$4.82 | Reliable |
| XAUUSD | -53.19% | -46.59% | 80.39% | 114 | 47.80% | -0.53 | -0.66 | 6 | −$44.88 | Reliable |
Profitable on 2 of 4 markets with reliable results.
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.
Against the other Trend Following EAs with a reliable result on the same market: EURUSD: better than 5% of 95 · GBPUSD: better than 74% of 95 · USDJPY: better than 99% of 95 · XAUUSD: better than 20% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 23% | +0.50% 2025-11 | -1.53% 2026-01 |
| GBPUSD | 62% | +2.12% 2026-02 | -1.76% 2026-10 |
| USDJPY | 54% | +3.00% 2026-07 | -1.81% 2025-11 |
| XAUUSD | 38% | +30.96% 2026-01 | -43.15% 2026-08 |
From the backtest equity curve, sampled about every two days; only reliable results.
Blow-up risk: No blow-up pattern found
None of the usual blow-up patterns were found in the code, 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 moving average crossover as its core trend-following strategy logic. Entry conditions trigger a long position when the fast MA (e.g., short-period EMA/SMA) crosses above the slow MA, and a short position on the reverse cross below. Exit conditions typically involve closing and reversing on the opposite crossover signal, or using fixed stop-loss and take-profit levels for risk management. Position sizing generally follows a fixed lot model, though some implementations may include account-balance-based dynamic lot calculation. In terms of money management, the EA lacks dynamic risk controls such as ATR-based stops or account-equity-proportional position sizing, relying too heavily on static parameters. The strategy performs well in strongly trending markets but suffers from frequent false signals and consecutive losses in choppy, range-bound conditions.
Strengths
- Simple and clear strategy logic, easy to understand and debug
- Few parameters reduce the risk of overfitting
- Effectively captures medium-to-long trend profit in trending markets
Weaknesses
- Frequent false signals in choppy/range-bound markets lead to consecutive losses
- Lacks dynamic stop-loss mechanisms (e.g., ATR-based stops), resulting in rigid risk control
- MA crossover signals have significant lag, often entering far from optimal price levels
- Fixed lot sizing cannot adjust position size based on market volatility
- No market regime filter (e.g., ADX or volatility filter), trades in all market conditions
Possible improvements
- Add a market regime filter (e.g., ADX or volatility indicator) to pause trading in choppy conditions and reduce false signals
- Introduce ATR-based dynamic stop-loss and take-profit to adapt risk parameters to market volatility
- Add multi-timeframe confirmation logic to improve signal reliability
Risk assessment
Overall risk: Medium
- Lagging crossover signals lead to suboptimal entries with potentially large floating drawdowns
- Default stop-loss of zero creates unlimited loss risk
- No choppy-market filter causes persistent losing signals during sideways periods
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
FastMA_Period | 10 | Fast MA period |
SlowMA_Period | 20 | Slow MA period |
MA_Method | MODE_SMA | Moving average method (SMA/EMA etc.) |
MA_AppliedPrice | PRICE_CLOSE | MA applied price type |
Lots | 0.1 | Trading lot size |
StopLoss | 0 | Stop loss in points, limits max loss per trade |
TakeProfit | 0 | Take profit in points, locks profit target per trade |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.