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
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | -1.18% | -1.02% | 4.84% | 138 | 48.60% | — | — | — | — | Custom indicator approximated |
| GBPUSD | +4.90% | +4.24% | 4.33% | 137 | 50.40% | — | — | — | — | Custom indicator approximated |
| USDJPY | +1.53% | +1.33% | 4.95% | 138 | 62.80% | — | — | — | — | Custom indicator approximated |
| XAUUSD | -100.00% | -100.00% | 100.00% | 124 | 47.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
Parameters
| Parameter | Default | Description |
|---|---|---|
RSI_Period | 14 | RSI calculation period |
RSI_Overbought | 70 | Dynamic overbought threshold base |
RSI_Oversold | 30 | Dynamic oversold threshold base |
LotSize | 0.1 | Fixed trading lot size |
StopLoss | 0 | Stop loss in points, 0 for dynamic calculation |
TakeProfit | 0 | Take profit in points, 0 for dynamic calculation |
MagicNumber | 2334 | EA magic number for order identification |
DynamicThreshold | true | Enable dynamic threshold calculation |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.