EMA 6.12
This EA uses a dual moving average crossover system with a fast SMA(6) and slow SMA(54) to generate trend-following buy and sell signals. It opens positions only when no existing positions are open, closes opposing positions on crossover signals, and applies a trailing stop with configurable step for open position management. A fixed take-profit in pips is also applied on entry.
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 | +14.95% | +12.87% | 22.19% | 86 | 54.10% | 0.59 | 0.67 | 6 | +$21.58 | Reliable |
| GBPUSD | +24.99% | +21.39% | 30.41% | 88 | 51.10% | 0.72 | 0.82 | 5 | +$28.40 | Reliable |
| USDJPY | +43.68% | +37.02% | 39.56% | 85 | 58.80% | 1.06 | 1.10 | 3 | +$51.39 | Reliable |
| XAUUSD | -100.00% | -100.00% | 100.00% | 12 | 50.00% | -0.74 | -1.00 | 4 | −$1,082.68 | Account stopped out |
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 99% of 95 · GBPUSD: better than 100% of 95 · USDJPY: better than 100% of 95 · XAUUSD: better than 0% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 54% | +18.92% 2026-04 | -10.40% 2026-10 |
| GBPUSD | 54% | +25.49% 2026-07 | -13.84% 2026-10 |
| USDJPY | 46% | +39.97% 2026-04 | -17.63% 2026-03 |
From the backtest equity curve, sampled about every two days; only reliable results.
Blow-up risk: High
- Hit a stop-out in our backtest (equity below 10%) on XAUUSD
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 a dual moving average crossover trend-following approach, using fast SMA(6) and slow SMA(54) to detect trend direction changes. Entry conditions: when no positions exist, a buy is placed on golden cross (slow crosses above fast) and a sell on death cross (slow crosses below fast). Exit conditions include closing opposing positions on crossover signals and a fixed pip take-profit target on entry. Position sizing uses a fixed lot size (InpLots parameter), with no dynamic adjustment based on account balance or risk percentage. Money management is weak because there is no stop-loss on entry—positions open with SL=0, relying solely on trailing stop and reverse signal closure for risk control. The trailing stop logic only adjusts the stop-loss when profit exceeds the trailing stop distance plus step, and each adjustment moves the stop by the configurable InpTrailingStep amount.
Strengths
- Strategy logic is clean and straightforward—dual MA crossover is a classic, well-understood trend-following method
- Includes trailing stop functionality that effectively locks in floating profits during trending markets
- New bar detection mechanism (PrevBars) prevents repeated trades within the same bar, reducing overtrading risk
- Thorough parameter validation at initialization checks MA periods and lot size validity
- Automatic 3/5 digit point adjustment ensures compatibility with different broker quote precisions
Weaknesses
- No stop-loss on entry (SL=0)—if the market moves sharply before trailing stop activates, losses can be catastrophic
- Fixed lot size with no account equity-based sizing means poor money management; small accounts risk blowup
- Only one direction at a time is allowed, causing frequent open/close cycles in ranging markets with high spread costs
- No spread filter—with a small TP of 10 pips, spreads can consume most profits or even cause net losses
- No trading session filter, potentially leading to unfavorable fills during low-liquidity or news event periods
Possible improvements
- Add a stop-loss on entry, ideally based on ATR or a fixed pip distance, to limit worst-case per-trade loss
- Implement dynamic position sizing based on account risk percentage (e.g., 1-2% equity risk per trade) instead of fixed lots
- Add a spread filter that suspends new entries when spread exceeds a threshold, protecting the profitability of small-TP strategies
- Add trading session filters to avoid trading during low-liquidity periods
- Consider adding an ADX or volatility filter to reduce false crossover signals in ranging markets
Risk assessment
Overall risk: Caution
- No stop-loss on entry means uncontrolled catastrophic losses are possible during extreme market moves
- 10-pip TP with 50-pip trailing stop creates a very poor risk-reward ratio before trailing activates
- Fixed lot sizing without money management is unsuitable for small accounts
- No hedging protection; ranging markets with frequent crossovers can cause consecutive losses from spread and slippage
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InpLots | 1.0 | Fixed lot size value |
InpTakeProfit | 10 | Take profit in points |
InpTrailingStop | 50 | Trailing stop distance in points |
InpTrailingStep | 5 | Trailing stop step in points |
MA_fast_ma_period | 6 | Fast MA period |
MA_slow_ma_period | 54 | Slow MA period |
m_magic | 32995373 | EA magic number for identifying its positions |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.