CrossoverMA
This EA uses the MetaQuotes standard library CExpert framework to implement a moving average crossover strategy. It generates buy/sell signals based on a single SMA indicator via CSignalMA, uses no trailing stop, and manages risk with fixed lot sizing. The architecture is modular, delegating signal, trailing, and money management to separate plug-in objects.
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 | +5.90% | +5.11% | 2.69% | 125 | 51.20% | 1.34 | 2.19 | 6 | +$4.72 | Reliable |
| GBPUSD | +4.10% | +3.55% | 3.85% | 129 | 49.20% | 0.73 | 1.06 | 6 | +$3.39 | Reliable |
| USDJPY | -1.35% | -1.17% | 4.56% | 241 | 47.10% | -0.21 | -0.30 | 9 | −$0.50 | Reliable |
| XAUUSD | +180.74% | +134.64% | 36.71% | 126 | 56.30% | 1.84 | 4.92 | 4 | +$143.44 | Reliable |
Profitable on 3 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 91% of 95 · GBPUSD: better than 77% of 95 · USDJPY: better than 40% of 95 · XAUUSD: better than 98% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 62% | +1.71% 2026-02 | -1.27% 2026-09 |
| GBPUSD | 54% | +2.74% 2026-04 | -1.26% 2026-08 |
| USDJPY | 38% | +2.67% 2026-05 | -2.20% 2026-02 |
| XAUUSD | 54% | +75.26% 2026-01 | -21.15% 2025-12 |
From the backtest equity curve, sampled about every two days; only reliable results.
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
The strategy concept is based on moving average crossover, generating buy signals when price crosses above the SMA and sell signals when it crosses below. Entry conditions rely entirely on the CSignalMA module's internal logic, which compares price position relative to the SMA to determine trend direction. Exit conditions are handled by the CExpert framework's default logic; since CTrailingNone is used (no trailing stop), exits depend entirely on reverse signals or any stop-loss/take-profit set by the framework. Position sizing uses CMoneyFixedLot with a fixed 0.1 lot per trade, and while a 10% percent parameter is set, it has limited effect in fixed lot mode. Money management lacks dynamic adjustment mechanisms — there is no adaptive position sizing based on account balance or market volatility. The overall strategy is simple and direct, suitable for strongly trending markets, but prone to frequent false signals and consecutive losses in ranging or choppy conditions.
Strengths
- Built on the MetaQuotes CExpert standard library, providing clean modular architecture that is easy to understand and extend
- Uses CSignalMA signal module with clear and simple strategy logic, well-suited for trend following
- Expert_EveryTick set to false means execution only on bar completion, reducing false signals and overtrading
- Magic number distinguishes trades from different EA instances, supporting parallel EA operation
Weaknesses
- Single SMA indicator strategy generates numerous false signals in ranging markets, leading to consecutive losses
- CTrailingNone means no trailing stop to lock in floating profits, winning trades may experience significant drawdowns
- Fixed lot money management cannot dynamically adjust position size based on account balance or volatility, limiting risk control
- No explicit stop-loss or take-profit settings; exits rely entirely on reverse signals, which may result in excessively large single-trade losses
Possible improvements
- Add a trailing stop module (e.g., CTrailingFixedPip or CTrailingMA) to lock in floating profits and improve reward-to-risk ratio
- Add a second moving average with a different period to form a dual-MA crossover confirmation, reducing false signals in ranging markets
- Replace fixed lot sizing with dynamic money management (e.g., CMoneyFixedRisk) that calculates lot size based on account risk percentage and stop-loss distance
Risk assessment
Overall risk: Medium
- No trailing stop mechanism means profitable positions lack dynamic protection, creating significant profit drawdown risk
- Fixed lot size does not adapt to account size — small accounts may be overleveraged while large accounts are underutilized
- No explicit stop-loss means single-trade theoretical loss is uncapped; extreme market conditions could cause major losses
- Single MA strategy opens and closes positions frequently in ranging markets, with accumulated trading costs eroding profits
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Inp_Signal_MA_Period | 12 | Moving average period |
Inp_Signal_MA_Shift | 0 | Moving average shift |
Inp_Signal_MA_Method | MODE_SMA | MA calculation method (simple/exponential/smoothed/linear weighted) |
Inp_Signal_MA_Applied | PRICE_CLOSE | Moving average applied price type |
Inp_Money_FixLot_Percent | 10.0 | Fixed lot money management risk percentage |
Inp_Money_FixLot_Lots | 0.1 | Fixed trading lot size |
Expert_MagicNumber | 21724 | EA unique identifier magic number |
Expert_EveryTick | false | Execute trading logic on every tick |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.