Mean Reverse
This EA implements a mean reversion strategy that trades against extreme price deviations, expecting price to return to its statistical mean. It identifies overbought and oversold conditions using deviation-based indicators and enters counter-trend positions when price stretches too far from its average. Exits are triggered when price reverts back toward the mean or when stop loss levels are hit.
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.79% | +5.02% | 3.26% | 140 | 56.10% | 1.31 | 1.78 | 5 | +$4.41 | Reliable |
| GBPUSD | +11.87% | +10.24% | 5.81% | 136 | 60.70% | 1.91 | 2.04 | 5 | +$8.97 | Reliable |
| USDJPY | -4.79% | -4.17% | 10.99% | 136 | 47.80% | -0.87 | -0.44 | 12 | −$3.52 | Reliable |
| XAUUSD | +188.08% | +139.70% | 56.40% | 135 | 53.30% | 1.54 | 3.33 | 7 | +$139.32 | 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 Mean Reversion EAs with a reliable result on the same market: EURUSD: better than 93% of 30 · GBPUSD: better than 100% of 32 · USDJPY: better than 19% of 32 · XAUUSD: better than 97% of 31
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 62% | +2.19% 2026-07 | -1.83% 2026-09 |
| GBPUSD | 85% | +4.17% 2026-02 | -3.69% 2026-01 |
| USDJPY | 31% | +2.47% 2026-09 | -5.34% 2026-02 |
| XAUUSD | 54% | +87.46% 2026-02 | -15.98% 2026-08 |
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 core strategy concept is mean reversion, assuming that price will eventually return to its mean after significant deviation. Entry conditions are based on the degree of price deviation from a mean (typically a moving average), entering counter-trend when deviation exceeds a configured threshold. Long entries occur when price falls significantly below the mean reaching an oversold threshold, while short entries occur when price rises significantly above the mean reaching an overbought threshold. Exit conditions include taking profit when price reverts back near the mean, and stop loss triggers when the adverse move continues beyond the stop level. Position sizing typically uses fixed lots or equity-proportional sizing. Money management relies on stop losses to control per-trade risk, but mean reversion strategies can suffer consecutive losses during trending markets, requiring prudent position control to avoid significant drawdowns.
Strengths
- Clear mean reversion logic grounded in statistical theory
- Performs well in range-bound markets by capturing price reversion opportunities
- Defined stop loss mechanism provides controlled per-trade risk
Weaknesses
- Can suffer consecutive stop losses during strong trending markets, leading to significant drawdowns
- Mean reversion inherently trades against the trend, potentially enduring large floating losses
- Lacks a trend filter mechanism, prone to premature entries at the beginning of new trends
Possible improvements
- Add a trend filter to pause or reduce mean reversion trades during strong trending conditions
- Introduce dynamic deviation thresholds that adapt entry conditions based on market volatility
Risk assessment
Overall risk: Medium
- Counter-trend trading can produce consecutive losses during trending markets
- Lack of multi-timeframe confirmation may lead to entries at the wrong market phase
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
LotSize | 0.1 | Lot size per trade |
StopLoss | 50 | Stop loss in points |
TakeProfit | 30 | Take profit in points |
MeanPeriod | 20 | Mean calculation period |
DeviationMultiplier | 2.0 | Deviation multiplier threshold |
MagicNumber | 57020 | EA identifier to distinguish orders |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.