EA-166 · Mean Reversion

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

RiskHigh risk
Blow-up riskHigh
Rating★★☆☆☆
TypeTrading EA
TimeframesM30, D1
IndicatorsBollinger Bands, DEMA
AuthorAM2.

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-26.32%-23.31%45.10%14041.70%-0.80-0.585−$20.14Reliable
GBPUSD-53.73%-48.81%55.30%13741.90%-1.48-0.977−$40.37Reliable
USDJPY-24.43%-21.61%38.78%13441.80%-0.75-0.638−$18.23Reliable
XAUUSD-100.00%-100.00%100.00%2948.30%-0.30-1.003−$473.10Account 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

MarketMonths with a gainBest monthWorst month
EURUSD38%+18.25% 2026-06-17.25% 2026-07
GBPUSD38%+8.71% 2026-03-20.84% 2026-07
USDJPY46%+10.81% 2026-02-12.66% 2026-05
XAUUSD67%+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

Code quality2.0
Strategy logic3.0
Risk management1.0
Robustness2.0
Innovation2.0
Documentation2.0
Overall2.0

Parameters

ParameterDefaultDescription
bands_period20Bollinger Bands calculation period
dema_period20Double EMA (DEMA) period
bands_shift0Bollinger Bands shift
deviation2Bollinger Bands standard deviation multiplier
Lot0.5Trading lot size

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.