BolBands
This EA trades Bollinger Bands mean reversion signals confirmed by a DEMA trend filter. It buys when a bullish candle crosses above the lower Bollinger Band while DEMA is rising, and sells when a bearish candle crosses below the upper Bollinger Band while DEMA is falling. Positions are closed on opposite band crossing signals.
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 | -26.32% | -23.31% | 45.10% | 140 | 41.70% | -0.80 | -0.58 | 5 | −$20.14 | Reliable |
| GBPUSD | -53.73% | -48.81% | 55.30% | 137 | 41.90% | -1.48 | -0.97 | 7 | −$40.37 | Reliable |
| USDJPY | -24.43% | -21.61% | 38.78% | 134 | 41.80% | -0.75 | -0.63 | 8 | −$18.23 | Reliable |
| XAUUSD | -100.00% | -100.00% | 100.00% | 29 | 48.30% | -0.30 | -1.00 | 3 | −$473.10 | Account stopped out |
Profitable on 0 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 0% of 30 · GBPUSD: better than 0% of 32 · USDJPY: better than 3% of 32 · XAUUSD: better than 0% of 31
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 38% | +18.25% 2026-06 | -17.25% 2026-07 |
| GBPUSD | 38% | +8.71% 2026-03 | -20.84% 2026-07 |
| USDJPY | 46% | +10.81% 2026-02 | -12.66% 2026-05 |
| XAUUSD | 67% | +96.04% 2025-11 | -100.00% 2026-01 |
From the backtest equity curve, sampled about every two days; only reliable results.
Blow-up risk: High
- Has no stop loss or trailing stop
- Hit a stop-out in our backtest (equity below 10%) on XAUUSD
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 strategy is centered on Bollinger Bands mean reversion, exploiting the statistical tendency of prices to return to the middle band after touching the upper or lower bands. Entry conditions: a buy requires the previous bar's close above the lower band and open below it (bullish candle crossing from below the lower band), while DEMA must be rising over three consecutive periods confirming an uptrend; the sell condition is the mirror opposite with a bearish candle crossing below the upper band and DEMA declining. Exit conditions: long positions close when a bearish candle crosses below the upper band, and short positions close when a bullish candle crosses above the lower band. Position sizing uses a fixed lot size (Lot parameter) with no dynamic sizing or risk-based adjustment. Money management has critical flaws—both stop loss and take profit are set to zero, relying entirely on signal-based exits with no risk protection whatsoever. The DEMA uses a daily timeframe while Bollinger Bands use M30, creating a multi-timeframe confirmation, though the large timeframe disparity may cause signal desynchronization.
Strengths
- Multi-timeframe combination of Bollinger Bands and DEMA provides trend filtering to reduce counter-trend trades
- New bar detection mechanism prevents multiple trades within the same bar
- Candle crossing-based entry is more robust than simple price comparison, confirming actual penetration behavior
Weaknesses
- Zero stop loss and take profit provides no risk protection; extreme market moves can cause catastrophic losses
- Fixed lot sizing with no dynamic position management fails to adapt to different account sizes and volatility regimes
- DEMA on D1 while Bollinger Bands on M30 creates timeframe mismatch that may cause delayed or incorrect signals
- Magic number is set to 0, making it impossible to distinguish this EA's orders from others
- OrderSend return value is not checked, leaving trade failures completely unhandled
Possible improvements
- Add stop loss and take profit parameters; SL at the opposite band or fixed pips, TP near the middle band
- Align DEMA timeframe with Bollinger Bands or use a closer timeframe to avoid signal scale mismatch
- Add OrderSend return value checking and error handling, set a non-zero magic number
- Introduce ATR-based dynamic position sizing that adjusts lot size based on account equity and volatility
Risk assessment
Overall risk: High risk
- Zero stop loss provides no downside protection; single trade loss is unbounded
- Fixed lot size ignores account risk capacity and market volatility
- No OrderSend error handling leaves EA in undefined state on trade failure
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
bands_period | 20 | Bollinger Bands calculation period |
dema_period | 20 | Double EMA (DEMA) period |
bands_shift | 0 | Bollinger Bands shift |
deviation | 2 | Bollinger Bands standard deviation multiplier |
Lot | 0.5 | Trading lot size |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.