EA-1071 · Breakout

Exp_BBSqueeze

This EA trades based on the BBSqueeze indicator, which detects Bollinger Band squeeze (low volatility) breakout conditions. It opens long positions when the upper histogram bar is non-empty and the previous lower bar confirms direction, and vice versa for shorts. Positions are managed with fixed Stop Loss and Take Profit levels, with optional money management based on deposit share.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryBreakout
RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsBollinger Bands, BBSqueeze, EMA
AuthorCopyright © 2012, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD-2.44%-2.12%5.87%14543.10%————Custom indicator approximated
GBPUSD+3.28%+2.84%4.19%14547.90%————Custom indicator approximated
USDJPY-1.30%-1.13%5.64%14559.00%————Custom indicator approximated
XAUUSD+119.89%+91.75%30.57%15251.70%————Custom indicator approximated

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 based on the Bollinger Band Squeeze breakout, which anticipates a directional move after market volatility compresses to extremely low levels. Entry conditions are: when the BBSqueeze indicator's upper histogram value (UpValue) is non-empty and not EMPTY_VALUE, combined with the previous bar's lower histogram value (DnValue) confirmation, a buy signal is triggered; conversely, when the lower histogram value is non-empty and confirmed by the upper histogram, a sell signal is triggered. Exit conditions rely on fixed Stop Loss (default 1000 points) and Take Profit (default 2000 points), yielding a reward-to-risk ratio of 2:1. Position sizing is controlled by the MM parameter, where negative values represent fixed lot sizes and positive values represent deposit-share-based lot calculation. Money management is handled by functions in TradeAlgorithms.mqh, supporting dynamic position calculation based on account balance. The strategy defaults to the H4 timeframe and uses SignalBar=1 (the previous closed bar) to avoid look-ahead bias, with a new bar detection mechanism ensuring signals are only calculated at bar close.

Strengths

  • Bollinger Band squeeze breakout is a classic strategy concept with statistical support, as low-to-high volatility transitions are relatively predictable
  • Using SignalBar=1 ensures signals are generated only after bar close, avoiding look-ahead bias
  • Complete buy/sell toggle controls allow flexible directional trading (long-only, short-only, or both)
  • The 2:1 reward-to-risk ratio design supports long-term positive expectancy
  • New bar detection mechanism prevents repeated calculations and duplicate trades within the same bar

Weaknesses

  • No trailing stop functionality, which may cause significant profit drawdown before the fixed take profit is hit
  • Lacks spread filter and trading session filter, potentially leading to unfavorable fills during low-liquidity periods
  • Stop loss of 1000 points and take profit of 2000 points may be excessive for H4, easily triggered in choppy markets
  • Depends on the external custom indicator BBSqueeze, increasing deployment complexity and dependency risk
  • No position check logic, potentially opening duplicate positions in the same direction

Possible improvements

  • Add a trailing stop feature to lock in partial profits when price moves favorably, improving risk-adjusted returns
  • Add position checking and maximum position limits to prevent duplicate directional entries and over-concentration risk

Risk assessment

Overall risk: Medium

  • Lack of position checking may cause duplicate directional entries, creating excessive exposure
  • Fixed stop loss/take profit does not adapt to market volatility changes, potentially causing frequent stop-outs during high-volatility periods
  • No spread filter means trades execute even when spreads widen

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
MM-0.1Trade deposit fraction, negative for fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Max price deviation in points (slippage tolerance)
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H4Indicator timeframe
BB_MethodMODE_EMA_Bollinger Bands histogram smoothing method
BB_Period20Bollinger Bands period
BB_Phase100Bollinger Bands smoothing parameter
BB_Deviation2.0Bollinger Bands deviation multiplier
AppliedPricePRICE_CLOSE_Applied price type
SignalBar1Bar index for entry signal

Similar Breakout 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.