# Bollinger Bands

Bollinger Bands is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Bollinger Bands plot a 20-period simple moving average with upper and lower bands placed 2 standard deviations of price above and below it, so band width expands and contracts with volatility. The Basis and both bands are plotted with a shaded fill between them. This is the standard implementation using John Bollinger's classic 20/2.0 settings.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Apr 13, 2020.
- Access: free.
- Concepts: [Bollinger Bands](https://www.luxalgo.com/library/concept/bollinger-bands/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=oi6k5vrs77fntjc67tfa6cts
- Page: https://www.luxalgo.com/library/indicator/bollinger-bands/

**Bollinger Bands** wrap price in a self-adjusting envelope: a 20-period simple moving average basis with bands 2 standard deviations away, stretching as prices scatter and pulling in as they settle, so high and low are judged against current volatility. The build implements John Bollinger's classic 20/2.0 construction: the Basis, the upper and lower bands, and a shaded fill between them.

## How to Trade the Bollinger Bands?

- **Tag of an outer band**: price is statistically stretched versus its recent average, a relative high or low, not an automatic signal.
- **Pullback to the Basis**: in trends the middle band is a drifting mean where pullbacks are evaluated for continuation.
- **Narrow bands**: tight bands show a market winding up; major moves often launch from the tightest stretches of the envelope.
- **Close outside a band**: the source is closing outside the bands entirely, the strongest stretch.

A band touch is a data point, not an instruction: closes beyond a band are routine in trends, so direction should come from structure or momentum. Alert conditions Cross Above Upper Band and Cross Below Lower Band fire when the close crosses an outer band.

## Bollinger Bands Settings

- **Length** (default 20): the window for the Basis SMA and the standard deviation. Shorter hugs price and multiplies band tags, longer builds a smoother envelope.
- **Source** (default close): the price series the bands are calculated on.
- **Multiplier** (default 2.0): standard deviations between Basis and bands. Lower gives frequent touches, higher isolates rarer, more significant excursions.
- **Basis / Bands / Fill** (Style): the colors of the middle band, the outer bands, and the shaded area between them.

## Frequently Asked Questions

### How do Bollinger Bands differ from Keltner Channels?

Width source: Bollinger Bands use the standard deviation of price, which snaps at outlier bars; Keltner Channels use average true range, which moves more gradually, so Bollingers flare and pinch harder, one reason squeeze techniques compare the two.

### Are the default 20/2.0 settings the right ones?

They are the standard reference and a sensible start anywhere: shorter and tighter suits fast mean-reversion, longer and wider suits trend confirmation. Shortening the Length pairs well with a slightly smaller Multiplier to keep a similar share of closes inside the envelope.

### Does price touching a band mean a reversal is coming?

No, the most common misreading. A strong trend can pin the leading band for long stretches (walking the band). Reversion setups off a band tag deserve the most weight when the Basis is flat and other evidence agrees.

## Related indicators

- [Bollinger Bands Breakout Oscillator](https://www.luxalgo.com/library/indicator/bollinger-bands-breakout-oscillator/) (Bollinger Bands): markdown at https://www.luxalgo.com/library/indicator/bollinger-bands-breakout-oscillator.md
- [Nadaraya-Watson Envelope](https://www.luxalgo.com/library/indicator/nadaraya-watson-envelope/) (Envelope): markdown at https://www.luxalgo.com/library/indicator/nadaraya-watson-envelope.md
- [TTM Squeeze](https://www.luxalgo.com/library/indicator/ttm-squeeze/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/ttm-squeeze.md
- [Fibonacci Bollinger Bands](https://www.luxalgo.com/library/indicator/fibonacci-bollinger-bands/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/fibonacci-bollinger-bands.md
- [Double Bollinger Zones](https://www.luxalgo.com/library/indicator/double-bollinger-zones/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/double-bollinger-zones.md
- [Proximal Range Filter](https://www.luxalgo.com/library/indicator/proximal-range-filter/) (Envelope): markdown at https://www.luxalgo.com/library/indicator/proximal-range-filter.md
- [Bollinger Squeeze](https://www.luxalgo.com/library/indicator/bollinger-squeeze/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/bollinger-squeeze.md
- [Donchian MA Bands](https://www.luxalgo.com/library/indicator/donchian-ma-bands/) (Donchian Channels): markdown at https://www.luxalgo.com/library/indicator/donchian-ma-bands.md

---

Source: https://www.luxalgo.com/library/indicator/bollinger-bands/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
