Noon Barbari
Sign up

Back to strategy library

Mean reversionLong only15m1h4h

Bollinger band reversion strategy

Fade a 2-sigma stretch below the mean and exit when price tags the middle band.

Thesis

Fade a 2-sigma stretch below the mean and exit when price tags the middle band.

Fits Mean reversion 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.

Smooth equity curve in low-volatility regimes with frequent small wins. Sharp drawdowns when a trend extends and price stays pinned below the lower band — the strategy expects mean reversion that may not arrive.

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_revert
weight: 1.0
long_only: true
indicators:
  bb20: {kind: bollinger, period: 20, std_mult: 2.0}
entry:
  combine: AND
  rules:
    - {lhs: {bar: close}, op: lt, rhs: {indicator: bb20, field: lower}}
exit:
  combine: OR
  rules:
    - {lhs: {bar: close}, op: gt, rhs: {indicator: bb20, field: mid}}
risk:
  stop_loss_pct: 0.03
  trailing_stop_pct: 0.02
  cooldown_bars: 3

Indicators

  • bb20Bollinger Bands (period 20, σ × 2)

    20-bar SMA with ±2σ bands. The mid line is the 20-bar mean; the lower band is the 2-standard-deviation oversold envelope.

Entry conditions

The bot opens a position the bar after every condition below has fired.

  • Enter long when close is below the lower Bollinger band — a 2σ stretch below the 20-bar mean.
  • Single position; 3-bar cooldown after exit.

Exit conditions

Any of the conditions below will close the position.

  • Exit when close pushes back above the middle band.
  • Hard 3% stop-loss; 2% trailing stop locks in any reversion gain.

Expected behavior

Smooth equity curve in low-volatility regimes with frequent small wins. Sharp drawdowns when a trend extends and price stays pinned below the lower band — the strategy expects mean reversion that may not arrive.

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.