Exp_IBS_RSI_CCI_v4
This EA combines the Internal Bar Strength (IBS) indicator with RSI and CCI to identify mean reversion opportunities. It enters long positions when IBS is low, RSI is oversold, and CCI confirms bearish exhaustion, and enters short when the opposite conditions are met. The strategy uses a fixed lot size with stop loss and take profit for risk management.
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 | +4.07% | +3.53% | 4.09% | 140 | 45.30% | 0.97 | 0.99 | 6 | +$2.69 | Reliable |
| GBPUSD | +4.74% | +4.11% | 5.42% | 140 | 48.20% | 0.87 | 0.88 | 7 | +$3.24 | Reliable |
| USDJPY | -4.98% | -4.34% | 9.20% | 140 | 44.60% | -0.98 | -0.54 | 7 | −$3.47 | Reliable |
| XAUUSD | -3.64% | -3.02% | 52.95% | 148 | 48.30% | 0.29 | -0.07 | 7 | −$4.15 | 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 83% of 30 · GBPUSD: better than 81% of 32 · USDJPY: better than 12% of 32 · XAUUSD: better than 45% of 31
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 46% | +3.58% 2026-01 | -1.29% 2026-07 |
| GBPUSD | 62% | +4.80% 2026-01 | -1.76% 2026-07 |
| USDJPY | 38% | +4.94% 2026-01 | -3.39% 2026-08 |
| XAUUSD | 46% | +38.31% 2026-01 | -24.05% 2026-02 |
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 is mean reversion based on Internal Bar Strength (IBS), which measures where the close sits within the current bar's high-low range — low values suggest closes near the low, implying bounce potential. Entry conditions require three simultaneous confirmations: for longs, IBS below its threshold, RSI below oversold level, and CCI below zero; for shorts, the mirror opposite applies. Exit conditions use fixed stop loss and take profit levels, and some versions may include a trailing stop mechanism. Position sizing relies on a fixed lot size approach without dynamic adjustment based on account equity or risk percentage. Money management depends on the stop-loss-to-take-profit ratio to control per-trade risk exposure, but lacks account-level risk controls such as maximum drawdown limits or consecutive loss protection.
Strengths
- Triple indicator filter reduces false signals — IBS combined with RSI and CCI provides multi-dimensional confirmation
- Mean reversion strategy performs well in ranging markets, suitable for non-trending conditions
- Fixed stop loss and take profit provide clear risk-reward ratio control
- Clean code structure with parameterized design facilitates optimization and backtesting
- Multi-indicator confluence entry reduces the risk of single indicator failure
Weaknesses
- Mean reversion strategy trades against strong trends, leading to consecutive losses in trending markets
- Fixed lot size ignores account equity changes, lacking dynamic position sizing
- No new bar check mechanism, potentially opening multiple positions on the same bar
- Lacks spread filter — spread costs could erode profits on lower timeframes
- Triple filter reduces false signals but also reduces trade frequency, potentially resulting in long idle periods
- Lacks account-level risk controls such as maximum position limits or drawdown protection
Possible improvements
- Add dynamic position sizing based on account equity and ATR for adaptive lot calculation
- Implement new bar check and spread filter to prevent duplicate entries and high-cost trades
- Add a trend filter (e.g., long-term moving average) to pause counter-trend trades in strong trends
- Implement maximum drawdown limits and consecutive loss protection mechanisms
- Optimize stop loss and take profit to ATR-based dynamic calculation for adapting to market volatility
Risk assessment
Overall risk: Medium
- Mean reversion trades against trends, creating significant risk during trending markets
- Lack of new bar check may cause duplicate position openings on the same bar
- Fixed lot size does not scale with account size, leading to improper risk exposure ratios
- No maximum drawdown protection or consecutive loss limits
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Lots | 0.1 | Fixed lot size per trade |
StopLoss | 500 | Stop loss in points |
TakeProfit | 1000 | Take profit in points; close on cumulative profit |
IBS_LevelLow | 0.2 | IBS low threshold, long entry condition |
IBS_LevelHigh | 0.8 | IBS high threshold, short entry condition |
RSI_Period | 14 | RSI indicator period |
RSI_Oversold | 30 | RSI oversold threshold |
RSI_Overbought | 70 | RSI overbought threshold |
CCI_Period | 50 | CCI indicator period |
TrailingStop | 0 | Trailing stop distance in points |
MagicNumber | 12345 | Magic number; 0 to manage all orders |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.