Thesis
Ride the volatility expansion when price breaks out of a tight Bollinger range.
Fits Breakout setups — works best when the underlying market behavior matches the thesis, and breaks down when it doesn't. Pair with the backtester's walk-forward mode before committing real capital.
Lots of small chop with a handful of clean runs that come after periods of low realised volatility. Quiet markets feed the strategy with setups; the payoff is asymmetric — many small losses, few large wins.
YAML rule-set
Paste this into the Strategy Designer's Text tab, or use the dashboard button above to load it as a template.
name: bollinger_squeeze
weight: 1.0
long_only: true
indicators:
bb20: {kind: bollinger, period: 20, std_mult: 2.0}
entry:
combine: AND
rules:
- {lhs: {bar: close}, op: crosses_up, rhs: {indicator: bb20, field: upper}}
exit:
combine: OR
rules:
- {lhs: {bar: close}, op: lt, rhs: {indicator: bb20, field: mid}}
risk:
trailing_stop_pct: 0.04
cooldown_bars: 3
Indicators
bb20Bollinger Bands (period 20, σ × 2)A 20-bar simple moving average envelope with bands at ±2 standard deviations. The width narrows during consolidation and expands on breakout.
Entry conditions
The bot opens a position the bar after every condition below has fired.
- Enter long when close crosses above the upper Bollinger band.
- Single position at a time; 3-bar cooldown after exit.
Exit conditions
Any of the conditions below will close the position.
- Close as soon as price slips back below the middle band (the 20-bar SMA).
- Trailing 4% stop on the runner so a failed breakout dies cheaply.
Expected behavior
Lots of small chop with a handful of clean runs that come after periods of low realised volatility. Quiet markets feed the strategy with setups; the payoff is asymmetric — many small losses, few large wins.
Equity-curve character, not a return forecast. Backtests are not promises about live performance.
Try it on your own data
Open the template in the dashboard to backtest it on BTC, ETH, or any CCXT symbol — or copy the YAML into the Strategy Designer to edit it first.
Past behavior on backtests is not a guarantee of future performance. Markets change; rule sets need re-validation. Trade at your own risk.