EA-17288 · Mean Reversion

MA Reverse

This EA implements a mean reversion strategy based on moving average deviation. It enters trades when price reverses from an extreme deviation away from a moving average, expecting price to revert back toward the MA. Trades are opened in the direction of the expected reversion with configurable lot sizing and stop loss.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsMA
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-0.50%-0.44%4.07%9850.50%-0.11-0.128−$0.17Reliable
GBPUSD+3.60%+3.12%4.31%10149.50%0.710.837+$3.57Reliable
USDJPY-0.78%-0.68%5.25%9649.00%-0.15-0.156−$0.81Reliable
XAUUSD+31.50%+25.39%54.85%9454.80%0.710.576+$36.54Reliable

Profitable on 2 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 60% of 30 · GBPUSD: better than 78% of 32 · USDJPY: better than 44% of 32 · XAUUSD: better than 52% of 31

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD46%+2.99% 2026-04-1.55% 2026-10
GBPUSD54%+3.09% 2026-04-2.54% 2026-10
USDJPY23%+2.99% 2026-07-1.84% 2026-03
XAUUSD54%+39.24% 2026-01-26.03% 2026-03

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

The core strategy concept of this EA is mean reversion, expecting price to return to the moving average after significant deviation. Entry conditions trigger when price deviates from the MA beyond a threshold and shows reversal confirmation, such as candlestick patterns or momentum shifts. Exit conditions include take-profit when price reverts to the MA zone, or a fixed stop-loss level. Position sizing uses fixed lot sizes, with some versions potentially supporting balance-based proportional sizing. Money management relies on stop-loss settings but lacks dynamic adjustment mechanisms. The overall strategy logic is straightforward but may suffer consecutive losses in strong trending markets due to counter-trend trading.

Strengths

  • Simple and clear strategy logic, easy to understand and debug
  • Mean reversion performs well in ranging markets with statistical edge
  • Highly configurable parameters suitable for optimization across instruments and timeframes

Weaknesses

  • Counter-trend trading in strong trending markets leads to consecutive losses
  • Lacks trend filter to distinguish between ranging and trending market conditions
  • Fixed lot size and stop-loss lack dynamic money management mechanisms

Possible improvements

  • Add a trend filter (e.g., ADX or higher timeframe MA direction) to avoid counter-trend entries in strong trends
  • Implement ATR-based dynamic stop-loss and take-profit to adapt to changing market volatility

Risk assessment

Overall risk: Medium

  • Counter-trend trading can cause consecutive stop-losses in strong trending markets
  • Lacks trend identification and volatility filtering mechanisms
  • Fixed stop-loss may not adapt to varying market volatility environments

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.2

Parameters

ParameterDefaultDescription
MAPeriod20Moving average period
MAMethodMODE_SMAMA calculation method
MAAppliedPricePRICE_CLOSEMA applied price
DeviationPips30Entry deviation threshold in pips
LotSize0.1Fixed trading lot size
StopLoss50Initial stop loss distance, 0 for no initial SL
TakeProfit30Take profit per order in pips
MagicNumber12345Magic number to identify EA positions, 0 for all positions

Similar Mean Reversion EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.