ThreeEMA
This EA implements a triple Exponential Moving Average (EMA) crossover trend-following strategy using the MQL5 Standard Library framework. It generates trade signals based on the alignment of fast (5), medium (12), and slow (24) period EMAs, with fixed stop-loss and take-profit levels, and uses fixed lot sizing for money management.
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
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
The core concept of this strategy is using three EMAs of different periods to determine trend direction and entry timing. When the fast EMA is above the medium EMA and the medium EMA is above the slow EMA, it identifies an uptrend and goes long; the opposite alignment signals a short entry. Entry conditions are based on the alignment order of the three lines, opening positions when a trend forms or reverses. Exit conditions use fixed point-based stop-loss (400 points) and take-profit (900 points), yielding a reward-to-risk ratio of 2.25:1 which is favorable. Position sizing uses a fixed lot model (CMoneyFixedLot) with a default of 0.1 lots, not dynamically adjusting based on account balance. Money management sets a 10% risk percentage parameter, but since fixed lots are used, this parameter affects margin calculation rather than dynamic position sizing. The strategy does not use trailing stops (CTrailingNone), relying entirely on fixed stop-loss and take-profit for exits.
Strengths
- Uses MQL5 Standard Library framework with clean, modular architecture separating signal, trailing, and money management components
- Triple EMA filtering reduces false signals more effectively than dual EMA crossovers, providing more reliable trend confirmation
- Take-profit to stop-loss ratio of 2.25:1 provides a positive expectancy foundation with favorable reward-to-risk
Weaknesses
- No trailing stop means the EA cannot lock in floating profits during strong trends, potentially exiting too early via fixed take-profit and missing extended moves
- Fixed lot sizing does not dynamically adjust based on account size or volatility, preventing true proportional risk control
- EMA crossover strategies generate frequent false signals in ranging markets leading to consecutive losses, with no range/filter mechanism included
Possible improvements
- Add a trailing stop module to replace CTrailingNone, dynamically locking in profits during trending markets and increasing maximum profit per trade
- Add a range market filter (such as ADX or ATR-based volatility check) to pause trading during low trend strength periods, reducing losses from false signals
Risk assessment
Overall risk: Medium
- EMA strategies generate frequent whipsaw signals in ranging markets, potentially accumulating consecutive small losses
- Fixed 400-point stop-loss may be insufficient during extreme market conditions and does not account for volatility differences across instruments
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Inp_Signal_ThreeEMA_FastPeriod | 5 | Fast EMA period |
Inp_Signal_ThreeEMA_MediumPeriod | 12 | Medium EMA period |
Inp_Signal_ThreeEMA_SlowPeriod | 24 | Slow EMA period |
Inp_Signal_ThreeEMA_StopLoss | 400 | Stop loss in points |
Inp_Signal_ThreeEMA_TakeProfit | 900 | Take profit in points |
Inp_Money_FixLot_Percent | 10.0 | Fixed lot money management risk percentage |
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.