What it measures
Bollinger Bands, developed by John Bollinger, place bands around a 20-bar simple moving average at a distance of two standard deviations of price (both adjustable). Because standard deviation measures how spread out recent closes are, the bands widen in volatile periods and contract in quiet ones.
| Output | Definition |
|---|---|
middle | Simple moving average of the close |
upper | Middle band plus deviation standard deviations |
lower | Middle band minus deviation standard deviations |
How to read it
- Squeeze. Unusually narrow bands mark low volatility, which often precedes a larger move. The squeeze does not tell you the direction.
- Walking the band. In strong trends price can ride along the upper or lower band; a touch of the band is not by itself a reversal signal.
- Mean reversion. In ranges, moves to a band and back toward the middle are common, which is how many range traders use them.
Common mistakes
- Selling every upper-band touch. Strong uptrends keep touching the upper band.
- Ignoring the trend. Band signals behave very differently in trends and in ranges; decide which you are in first.
Use it in a scan
Price closing above the upper band:
c > bb_upper(20, 2)
A squeeze, with band width under 10% of the middle band:
(bb_upper(20, 2) - bb_lower(20, 2)) / bb_middle(20, 2) < 0.10Inputs
| Input | Type | Default | Range |
|---|---|---|---|
period | integer | 20 | 2 – 300 |
deviation | number | 2 | 0.000001 – 10 |
Outputs
upper, middle, lower
References
- John Bollinger, Bollinger Bands
