BB Automated
This EA places BuyLimit and SellLimit pending orders at the Bollinger Bands lower and upper bands respectively on every new M15 candle, closing positions when price reverts to the middle band (SMA). It deletes all pending orders at the start of each new bar and replaces them with fresh ones at the updated band levels. The strategy is a classic Bollinger Band mean-reversion system with no stop loss or take profit.
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 | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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
- 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 strategy concept is based on Bollinger Band mean reversion, assuming price will revert to the middle band after touching the upper or lower band. Entry conditions: on each new M15 candle open, a BuyLimit pending order is placed at the lower band and a SellLimit pending order is placed at the upper band. Exit conditions: when the close price reaches the BB middle band (SMA), all open buy positions are closed if price is above SMA, and all sell positions are closed if price is below SMA. Position sizing uses a fixed 0.01 lot micro size with no dynamic lot adjustment mechanism whatsoever. Money management is completely absent — there is no stop loss, no take profit, no maximum position limit, and no drawdown control. Pending order management deletes all unfilled pending orders at each new bar and replaces them at updated band levels, ensuring synchronization with current BB values, but frequent order placement may be restricted by brokers.
Strengths
- Clean and simple strategy logic based on the classic Bollinger Band mean reversion principle, easy to understand and verify
- Uses pending limit orders instead of market orders for better entry prices and reduced slippage impact
- Updates pending order prices on each new bar to ensure synchronization with current BB values, preventing stale order fills
- Fixed micro lot size of 0.01 limits per-trade risk exposure during testing
- Uses Magic Number 1221 to distinguish its own orders, avoiding conflicts with other EAs
Weaknesses
- No stop loss or take profit at all — losses can grow unbounded during trending markets
- CloseAllPending function does not check Magic Number, potentially deleting pending orders from other EAs
- OrderSend uses OrderSymbol() instead of NULL or explicit Symbol(), which may fail when no order is pre-selected
- No check for existing orders or positions before placing new pending orders, potentially causing duplicate orders
- iVolume==1 for new bar detection is unreliable and behaves differently in backtesting vs live, should use time comparison
- No spread filter, no trading session restrictions, no maximum position count control
Possible improvements
- Add stop loss and take profit parameters, at minimum implement ATR-based or BB-width-based dynamic stops to prevent catastrophic losses in trending markets
- Add Magic Number filter in CloseAllPending to avoid accidentally deleting other EAs' pending orders
- Replace iVolume==1 new bar detection with time comparison method (compare current bar time with last recorded time) for consistent behavior in backtesting and live trading
- Check for existing same-direction pending orders or positions before placing new orders to prevent duplicates
- Add maximum position count limits and drawdown controls for better money management safety
Risk assessment
Overall risk: High risk
- No stop loss exposes the account to unlimited per-trade loss, risking account blowup in trending markets
- CloseAllPending without Magic Number check may delete other EAs' orders causing strategy disruption
- OrderSymbol() returns empty when no order is selected, potentially causing OrderSend failures or wrong symbol orders
- iVolume==1 new bar detection may trigger on every tick in backtesting, causing excessive order placement and deletion
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
BB_period | 20 | Bollinger Bands period, default 20 |
BB_dev | 2 | Bollinger Bands standard deviation multiplier, default 2 |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.