Bollinger Bands RSI
This EA combines Bollinger Bands with RSI to identify mean reversion trading opportunities. It enters long positions when price touches the lower Bollinger Band and RSI confirms oversold conditions, and enters short positions when price touches the upper Bollinger Band and RSI confirms overbought conditions. Exits are triggered when price reverts to the Bollinger Bands middle line or by fixed stop loss and 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 | -9.12% | -7.97% | 10.26% | 86 | 44.20% | -2.27 | -0.89 | 6 | −$10.61 | Reliable |
| GBPUSD | -1.85% | -1.61% | 3.76% | 88 | 52.90% | -0.34 | -0.49 | 4 | −$1.85 | Reliable |
| USDJPY | +1.16% | +1.01% | 4.19% | 77 | 50.00% | 0.27 | 0.28 | 8 | +$1.33 | Reliable |
| XAUUSD | +105.12% | +81.05% | 39.08% | 91 | 54.40% | 1.57 | 2.69 | 8 | +$119.56 | Reliable |
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 7% of 30 · GBPUSD: better than 44% of 32 · USDJPY: better than 53% of 32 · XAUUSD: better than 87% of 31
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 15% | +0.85% 2026-10 | -2.48% 2026-01 |
| GBPUSD | 46% | +1.69% 2026-02 | -2.03% 2026-01 |
| USDJPY | 62% | +2.37% 2026-05 | -1.58% 2026-02 |
| XAUUSD | 77% | +62.45% 2026-02 | -16.13% 2026-01 |
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
This EA employs a mean reversion strategy with dual confirmation from Bollinger Bands and RSI indicators. Entry conditions require price to touch or breach the lower Bollinger Band combined with RSI below the oversold threshold (typically 30) for long positions, confirming excessive selling; for short positions, price must touch or exceed the upper Bollinger Band with RSI above the overbought threshold (typically 70), confirming excessive buying. Exit conditions include closing positions when price reverts to the Bollinger Band middle line for profit, or hitting fixed stop loss and take profit levels. Position sizing typically uses fixed lot sizes or percentage-based calculations relative to account balance. Money management relies on stop loss orders to control per-trade risk but lacks dynamic position adjustment mechanisms. The overall strategy logic is clear and suitable for ranging markets, but may suffer consecutive losses in strong trending conditions.
Strengths
- Dual indicator confirmation filters false signals and improves entry quality
- Mean reversion strategy logic is clear and easy to understand and optimize
- Bollinger Bands adapt to volatility, automatically adjusting entry thresholds across different market volatility environments
- Suitable for ranging markets, capturing mean reversion profits when price deviates excessively
- Highly adjustable parameters facilitate optimization for different instruments and timeframes
Weaknesses
- Mean reversion strategy frequently trades against strong trends causing consecutive losses
- Lacks trend filter to distinguish between ranging and trending markets
- Fixed stop loss and take profit may not suit all market conditions, lacking dynamic risk management
- RSI and Bollinger Band signals can lag, resulting in suboptimal entry timing
- Lacks position sizing mechanism unable to dynamically adjust based on market volatility
Possible improvements
- Add a trend filter (e.g., ADX or higher timeframe moving average) to pause trading or reverse strategy during trending markets
- Introduce dynamic stop loss mechanism (e.g., trailing stop or ATR-based stop) to replace fixed pip-based stops
- Implement volatility-adaptive position sizing that adjusts risk exposure per trade based on ATR
Risk assessment
Overall risk: Medium
- Lacks trend filter, may consecutively build positions against trends causing significant drawdowns
- Fixed lot sizing without proper money management may cause small accounts to blow up on single large losses
- Stop loss set to 0 provides no risk protection, potentially leading to unlimited single-trade losses
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
BB_Period | 20 | Bollinger Bands calculation period |
BB_Deviation | 2.0 | Bollinger Bands standard deviation multiplier |
RSI_Period | 14 | RSI indicator period |
RSI_Oversold | 30 | RSI oversold threshold |
RSI_Overbought | 70 | RSI overbought threshold |
StopLoss | 0 | Stop loss in points |
TakeProfit | 0 | Take profit in points |
LotSize | 0.1 | Trading lot size |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.