EA-20353 · Mean Reversion

Bollinger Bands N positions v2

This EA trades mean reversion signals using Bollinger Bands, opening up to N positions when price touches or exceeds the bands. It enters on band penetration expecting price to revert to the mean (middle band), and manages multiple positions with configurable position limits.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4
IndicatorsBollinger Bands
AuthorCopyright © 2017, Vladimir Karputov

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-2.15%-1.87%5.65%14544.40%-0.44-0.386−$1.73Reliable
GBPUSD+5.31%+4.60%4.11%14549.30%0.921.296+$3.53Reliable
USDJPY+2.99%+2.59%3.38%27046.50%0.640.897+$1.11Reliable
XAUUSD+35.45%+28.49%66.88%14953.70%0.800.536+$23.79Reliable

Profitable on 3 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 50% of 30 · GBPUSD: better than 84% of 32 · USDJPY: better than 66% of 32 · XAUUSD: better than 58% of 31

Month by month

MarketMonths with a gainBest monthWorst month
EURUSD62%+1.84% 2026-04-2.21% 2026-09
GBPUSD69%+2.40% 2026-07-2.09% 2026-03
USDJPY38%+4.43% 2026-01-1.46% 2026-07
XAUUSD54%+69.88% 2026-08-33.43% 2026-02

From the backtest equity curve, sampled about every two days; only reliable results.

Blow-up risk: No blow-up pattern found

  • Has no stop loss or trailing stop

On its own this is not a typical blow-up pattern, 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 is mean reversion based on Bollinger Bands, going short when price touches or breaches the upper band and going long when it touches or breaches the lower band, expecting price to revert to the middle band. Entry conditions rely on Bollinger Band penetration, with the system allowing accumulation of up to N positions in the same direction to average the entry price and improve profit probability. Exit conditions are typically set as take-profit at the Bollinger middle band or a fixed take-profit level, combined with stop-loss to control per-trade losses. Position sizing employs a scaled entry approach where each signal triggers an additional position up to the maximum N positions, with each position's lot size independently configurable. Money management relies on stop-loss and the maximum position count limit to control overall risk exposure, though stacked positions in strong trending markets can result in significant cumulative losses.

Strengths

  • Bollinger Band mean reversion logic is classic and reliable, performing well in ranging markets
  • Supports N-position scaling to average entry price and improve mean-reversion profit probability
  • Highly configurable parameters for BB period, deviation multiplier, and maximum position count

Weaknesses

  • Mean reversion strategy prone to consecutive losses in strong trends, with multiple positions amplifying risk
  • Default stop-loss and take-profit values may be zero or insufficiently refined, lacking strict risk protection
  • Missing trend filter to distinguish ranging from trending markets, causing repeated counter-trend entries in trends

Possible improvements

  • Add a trend filter (e.g., ADX or higher-timeframe MA) to avoid counter-trend entries in trending markets
  • Implement dynamic trailing stop and breakeven functionality to better protect floating profits
  • Add inter-position correlation checks and maximum drawdown controls to limit total risk exposure in extreme scenarios

Risk assessment

Overall risk: Medium

  • Multiple stacked positions can lead to significant cumulative losses in extreme trends
  • Default stop-loss and take-profit parameters may be inadequate requiring manual configuration
  • Lack of trend filter causes persistent counter-trend entries in one-directional markets

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
BB_Period20Bollinger Bands calculation period
BB_Deviation2.0Bollinger Bands standard deviation multiplier
N_Positions3Maximum positions in the same direction
LotSize0.01Lot size per trade
StopLoss0Stop loss in points
TakeProfit0Take profit in points
MagicNumber12345Manage positions with specific magic number only; 0 manages all

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.