EA-16994 · Mean Reversion

Bollinger Bands (xoiper)

This EA trades Bollinger Bands mean-reversion signals, selling when price breaks above the upper band and buying when it breaks below the lower band. It uses a fixed take-profit and stop-loss based on point distances, with an optional lot-sizing mechanism that scales position size proportionally to account balance. Order management is performed on each tick, closing positions when profit or loss thresholds are hit.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskHigh risk
Blow-up riskLow
Rating★☆☆☆☆
TypeTrading EA
TimeframesM1, M5, M15
IndicatorsBollinger Bands
Authorxoiper

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

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

The strategy concept is classic Bollinger Band mean reversion: it sells when price breaks above the upper band by a threshold distance and buys when price breaks below the lower band, assuming price will revert to the mean. Entry conditions trigger SELLme when close price exceeds upper band plus ExtBDistance points, and BUYme when close falls below lower band minus ExtBDistance points. Exit conditions are dual: positions are closed in-code when unrealized profit reaches ExtProfitMade points or loss reaches ExtLossLimit points, while SL/TP orders are also placed at order open for broker-side protection. Position sizing offers two modes: fixed lots or dynamic lots that scale linearly with account balance relative to starting balance, capped at 500 lots. Money management is rudimentary, relying solely on a balance-ratio lot calculation without drawdown limits or percentage-of-equity risk sizing. The Bollinger Band uses PRICE_OPEN with a very short period of 4, which is likely to generate excessive signals and lead to overtrading.

Strengths

  • Clear and understandable Bollinger Band mean-reversion logic
  • Dual exit protection with both in-code profit/loss checks and broker-side SL/TP orders
  • OneOrderOnly mode restricts to a single position, helping control risk exposure
  • Comprehensive logging functionality aids backtesting analysis and troubleshooting
  • Automatic digits_adjust mechanism for 3/5 digit symbol compatibility

Weaknesses

  • BB period of 4 is extremely short, generating overly frequent signals and likely overtrading
  • Risk-reward ratio is terrible at roughly 1:0.15 (20 point SL vs 3 point TP), virtually guaranteeing long-term losses
  • Dynamic lot sizing scales linearly with balance, accelerating position size during wins and risking blow-up during drawdowns
  • No spread filter means the strategy is vulnerable to wide-spread instruments eating into the tiny profit target
  • SL/TP calculations add an unexplained 10-point offset, making maintenance difficult without documentation
  • Full position loop runs every tick rather than on new bars only, wasting computational resources

Possible improvements

  • Increase BB period to 20+ and add signal confirmation (e.g., RSI overbought/oversold or volume) to reduce false signals
  • Improve risk-reward ratio by raising take-profit to at least 1:1 with stop-loss, or implement trailing stop to lock profits
  • Add maximum drawdown limits and equity-percentage risk sizing instead of simple balance-ratio lot calculation
  • Add spread filter and trading session filter to avoid entries during high-cost periods

Risk assessment

Overall risk: High risk

  • Extremely poor risk-reward ratio (3pt TP vs 20pt SL) requires 87%+ win rate just to break even
  • Dynamic lots grow without meaningful cap (500 lot ceiling is absurdly high), exposing enormous risk after winning streaks
  • BB period 4 generates excessive false breakout signals, frequent stop-outs will rapidly deplete the account
  • No maximum position limit (when OneOrderOnly=false) and no drawdown protection mechanism

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management1.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall1.7

Parameters

ParameterDefaultDescription
InpProfitMade3Take profit in points (auto x10 for 3/5-digit)
InpLossLimit20Stop loss in points (auto x10 for 3/5-digit)
BB_period4Bollinger Bands period
BB_deviation2Bollinger Bands standard deviation multiplier
InpBDistance3Extra offset in points for Bollinger Band breakout
InpLots1.0Lot size per trade
LotIncreasetrueDynamically adjust lot size based on balance

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.