Simple MA+ADX EA
This EA combines a Simple Moving Average (SMA) crossover with the ADX indicator to identify and trade trending markets. It enters long when the fast SMA crosses above the slow SMA and ADX confirms trend strength, and enters short on the reverse crossover with ADX confirmation. Exits are triggered by opposing crossover signals or stop-loss/take-profit levels.
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 | +2.90% | +2.51% | 3.79% | 93 | 47.30% | 0.67 | 0.77 | 7 | +$3.52 | Reliable |
| GBPUSD | +1.37% | +1.19% | 4.46% | 94 | 51.10% | 0.28 | 0.31 | 6 | +$1.46 | Reliable |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | No trades |
| XAUUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | No trades |
Profitable on 2 of 2 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 75% of 95 · GBPUSD: better than 56% of 95
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 54% | +2.90% 2026-04 | -1.76% 2026-10 |
| GBPUSD | 54% | +3.79% 2026-04 | -1.90% 2026-01 |
From the backtest equity curve, sampled about every two days; only reliable results.
Strategy analysis
The core concept of this strategy uses dual moving average crossovers to determine trend direction while leveraging the ADX indicator to filter out range-bound markets, entering only when a trend is confirmed. Entry conditions are: open a long position when the fast SMA crosses above the slow SMA and ADX exceeds its threshold, and open a short position on the reverse crossover with ADX confirmation. Exit conditions include closing positions on opposing SMA crossover signals or hitting fixed stop-loss and take-profit levels. Position sizing uses a fixed lot approach without dynamic adjustment based on account equity or volatility. Money management is relatively simple, relying solely on stop-loss and take-profit parameters to control per-trade risk, lacking dynamic risk management mechanisms based on account balance or market volatility. The overall strategy logic is clear, but risk control measures are limited, and there is no protection against consecutive false signals during choppy market conditions.
Strengths
- ADX filter reduces choppy market false signals and unnecessary losing trades
- Dual MA crossover logic is simple and clear, easy to understand and optimize
- Fewer strategy parameters reduce the risk of overfitting to historical data
- Defined stop-loss and take-profit provide clear per-trade risk control
- Performs well in strongly trending markets with favorable risk-reward ratios
Weaknesses
- Fixed lot sizing cannot dynamically adjust positions based on market volatility or account risk
- MA crossover signals have inherent lag, often entering far from optimal price levels
- No scaling in or out mechanism to optimize positions as trends develop
- Lacks new bar check, risking multiple entries on the same bar
- ADX threshold requires separate optimization per symbol and timeframe, limiting universality
Possible improvements
- Introduce ATR-based dynamic stop-loss and take-profit to adapt risk control to changing market volatility
- Add new bar detection to prevent duplicate trade signals on the same bar
- Implement dynamic position sizing based on account risk percentage instead of fixed lots
Risk assessment
Overall risk: Medium
- Lack of new bar check may cause repeated entries on the same bar leading to position overload
- Fixed lot size does not scale with account size, risking over-leveraging on small accounts
- MA lag in ranging markets can lead to consecutive stop-loss hits
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
FastMA_Period | 10 | Fast moving average period |
SlowMA_Period | 50 | Slow moving average period |
ADX_Period | 14 | ADX indicator period |
ADX_Threshold | 25 | ADX trend strength threshold |
StopLoss | 300 | Stop loss in points |
TakeProfit | 600 | Take profit in points |
Lots | 0.1 | Fixed trading lot size |
MA_Method | MODE_SMA | Moving average calculation method |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.