Bollinger Bands breakout
The same Bollinger Bands read the other way round — as a breakout. A close beyond the upper band means price leaves its usual range, beyond the lower one it falls faster than usual. The robot follows the breakout and closes the trade at the middle line when the move runs out of steam.
Choose a platform: MT5 shows the chart and Inputs screenshots from MetaTrader 5, MT4 shows the chart with entries and the Inputs screenshot from MetaTrader 4.
How the robot trades
When it buys
Price closes above the upper Bollinger band.
When it sells
Price closes below the lower band.
When it exits
A buy closes when price returns below the middle line; a sell closes when it returns above it.
Screenshot 1 of 5
The conditions as constructor blocks
Open a buy
Open a sell
Close a buy
Close a sell
Inputs
These inputs appear in the expert advisor settings in MetaTrader 5 or MetaTrader 4, and they are what the strategy tester goes through when it optimises the robot.
| Input | Default | What it means |
|---|---|---|
| InpBB_Middle_period | 20 | Period of the bands: how many recent candles are averaged and set the width of the range. |
| InpBB_Middle_deviation | 2 | Deviation: how many average deviations the bands sit from the middle line. The larger it is, the rarer the breakouts. |


How to tune the robot to your style
- Narrow the bands (deviation 1.5, for example) — there will be more breakouts, and more false ones too.
- Compare it with the Bollinger bounce robot: there the same picture is read the other way round.
- Check the robot on another timeframe in the tester: breakouts are noisier on H1 than on H4.
You can do all of this in the constructor without signing up. To save your changes and come back to them later, you need an account.
Risks
How a strategy behaved in the past does not predict its future results. Check the robot in the strategy tester and on a demo account first, and only then decide whether to trade it with real money. This robot is an example to adapt to your instrument, timeframe and risk rules.