volatility indicator

Bollinger Bands (Bollinger Bands)

Bollinger Bands consist of a middle SMA(20) band with upper and lower bands at ±2 standard deviations. They measure volatility and relative price levels.

Formula

Middle Band = SMA(20)
Upper Band = SMA(20) + (2 × StdDev)
Lower Band = SMA(20) - (2 × StdDev)

Common strategies

  • Mean reversion: Price touching the lower band may bounce back to the mean; upper band may reverse down.
  • Bollinger squeeze: Bands contracting tightly indicates low volatility, often followed by a breakout.
  • Band ride: In strong trends, price can "ride" the upper or lower band for extended periods.

How CommonQuant uses it

CommonQuant pre-calculates Bollinger Bands(20, 2) on all timeframes. DSL strategies can reference bb_upper(), bb_middle(), and bb_lower().

Frequently asked questions

What is a Bollinger squeeze?

A squeeze occurs when the upper and lower bands come very close together, indicating low volatility. It often precedes a sharp breakout.

Are Bollinger Bands good for crypto?

Yes, especially for detecting volatility expansion. Crypto's high volatility makes the bands wider, and squeezes often precede major moves.

Explore

All indicator guides · Trade ideas