EA-2334 · Mean Reversion

exp_dynamicrs_c

This EA implements a dynamic RSI-based mean reversion strategy that identifies overbought and oversold conditions using an adaptive RSI indicator with dynamic threshold levels. It enters trades when RSI signals extreme deviations from the mean and exits upon reversion to neutral zones or when dynamic stop-loss/take-profit levels are hit.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsRSI, ATR
AuthorCopyright © 2014, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-1.18%-1.02%4.84%13848.60%————Custom indicator approximated
GBPUSD+4.90%+4.24%4.33%13750.40%————Custom indicator approximated
USDJPY+1.53%+1.33%4.95%13862.80%————Custom indicator approximated
XAUUSD-100.00%-100.00%100.00%12447.60%————Custom indicator approximated

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

This EA employs a dynamic RSI (Relative Strength Index) as its core strategy indicator, distinguishing itself from traditional fixed overbought/oversold thresholds by using dynamically calculated threshold levels that adapt to changing market volatility. Entry conditions are: go long when RSI drops below the dynamic lower threshold, and go short when RSI breaks above the dynamic upper threshold, embodying the core mean reversion philosophy that extreme price deviations will revert to the mean. Exit conditions include closing positions when RSI returns to the neutral zone, as well as hitting dynamically calculated stop-loss and take-profit levels based on ATR or similar volatility measures. Position sizing supports fixed lot trading and may also adjust position size dynamically based on account risk percentage. Money management benefits from dynamic stop-loss and take-profit settings that help control risk exposure per trade, though the specifics depend on the parameter configuration.

Strengths

  • Dynamic RSI thresholds adapt to changing market volatility, offering more flexibility than fixed thresholds
  • Mean reversion strategy performs well in ranging markets with high win rate potential
  • Dynamic stop-loss and take-profit mechanisms adjust risk control based on current market conditions
  • Avoids overfitting to fixed parameter values, enhancing strategy robustness

Weaknesses

  • Mean reversion strategies suffer consecutive losses in strong trending markets, lacking trend filtering
  • Dynamic threshold calculation may introduce lag, leading to imprecise entry timing
  • No explicit martingale or position accumulation control, risking buildup against the trend
  • Lacks multi-timeframe confirmation, single RSI signals are prone to false breakouts

Possible improvements

  • Add a trend filter (e.g., moving average direction or ADX) to avoid counter-trend trading in strong trends
  • Incorporate multi-timeframe RSI confirmation to improve signal reliability and reduce false signals

Risk assessment

Overall risk: Medium

  • Mean reversion strategy may continuously build counter-trend positions during trending markets leading to significant drawdown
  • Dynamic threshold calculation may fail in extreme market conditions if parameters are improperly set

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation3.0
Documentation1.0
Overall2.5

Parameters

ParameterDefaultDescription
RSI_Period14RSI calculation period
RSI_Overbought70Dynamic overbought threshold base
RSI_Oversold30Dynamic oversold threshold base
LotSize0.1Fixed trading lot size
StopLoss0Stop loss in points, 0 for dynamic calculation
TakeProfit0Take profit in points, 0 for dynamic calculation
MagicNumber2334EA magic number for order identification
DynamicThresholdtrueEnable dynamic threshold calculation

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.