EMA_WMA v2
This EA uses a dual moving average crossover system combining EMA (Exponential Moving Average) and WMA (Weighted Moving Average) to generate trend-following trade signals. It enters long positions when the faster MA crosses above the slower MA and short positions on the opposite crossover, aiming to capture sustained directional moves in the market.
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.38% | +0.33% | 4.22% | 127 | 48.40% | 0.11 | 0.09 | 4 | +$0.57 | Reliable |
| GBPUSD | +1.09% | +0.95% | 6.20% | 130 | 46.50% | 0.23 | 0.18 | 9 | +$1.03 | Reliable |
| USDJPY | +2.65% | +2.30% | 5.57% | 130 | 55.00% | 0.47 | 0.48 | 5 | +$1.94 | Reliable |
| XAUUSD | +71.00% | +55.78% | 47.47% | 129 | 52.30% | 0.96 | 1.50 | 5 | +$57.40 | Reliable |
Profitable on 4 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 62% of 95 · GBPUSD: better than 53% of 95 · USDJPY: better than 79% of 95 · XAUUSD: better than 83% of 96
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +2.02% 2026-02 | -0.99% 2026-09 |
| GBPUSD | 62% | +2.81% 2026-02 | -2.30% 2026-03 |
| USDJPY | 62% | +2.50% 2026-09 | -3.72% 2026-08 |
| XAUUSD | 54% | +73.10% 2026-02 | -15.65% 2026-06 |
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 strategy is based on EMA and WMA crossover signals for trend-following trading, with a clear and easy-to-understand concept. Entry conditions are triggered when the faster MA crosses the slower MA — a golden cross initiates a long position while a death cross initiates a short position, leveraging the difference in weighting calculations between EMA and WMA to confirm trend direction. Exit conditions typically rely on reverse crossover signals or fixed stop-loss and take-profit levels, but the implementation may lack a dynamic trailing stop mechanism. Position sizing is based on fixed lot sizes or simple proportional rules, without employing sophisticated money management algorithms such as Kelly criterion or risk parity. Money management is relatively basic, likely relying only on fixed lot size parameters from input settings, lacking the ability to dynamically adjust position size based on account equity. The overall strategy logic is simple and straightforward, but it is prone to generating frequent false signals in ranging markets, leading to consecutive losses.
Strengths
- Simple and clear strategy logic that is easy for beginners to understand and debug
- Combining EMA and WMA with different weighting schemes provides more reliable signals than a single MA system
- Performs well in trending markets, effectively capturing medium-to-long-term directional moves
Weaknesses
- Generates frequent false crossover signals in ranging markets, leading to consecutive losses
- Lacks dynamic stop mechanisms like trailing stops, creating significant profit giveback risk
- Position sizing is overly simplistic without dynamic adjustment based on market volatility or account risk
Possible improvements
- Add an ADX or volatility filter to reduce trading frequency and avoid false signals in ranging markets
- Implement trailing stops and dynamic position sizing that adjusts stop distance and lot size based on ATR
Risk assessment
Overall risk: Medium
- MA crossover systems suffer from signal lag and frequent false entries in ranging markets, potentially causing consecutive stop-losses
- Fixed stop-loss and take-profit levels do not account for changing market volatility, which may trigger stops too frequently during high-volatility periods
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
FastMA_Period | 10 | Fast MA period |
SlowMA_Period | 30 | Slow MA period |
FastMA_Method | MODE_EMA | fastMAmethod (EMA) |
SlowMA_Method | MODE_WMA | slowMAmethod (WMA) |
LotSize | 0.1 | Trading lot size |
StopLoss | 50 | Stop loss in points |
TakeProfit | 100 | Take profit in points |
MA_AppliedPrice | PRICE_CLOSE | MA applied price type |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.