Formula
Middle = MA(source, N) (SMA by default; EMA or RMA selectable)
sigma = sqrt( sum((x - mean)^2) / N ) over the last N source values (population)
Upper = Middle + k * sigma
Lower = Middle - k * sigmaHow TraderAI calculates it
TraderAI's defaults are a 20-period simple moving average of the close with bands 2 standard deviations away. The deviation is the population standard deviation (divided by N, not N - 1) of the last 20 source values, measured around their own mean. You can switch the middle line to an EMA or RMA; the deviation is still measured the same way. The first value appears after 20 candles.
Live example
How traders read it
Price near the upper band means it closed high within its recent range, and near the lower band low. In a trend, price can travel along one band for a long time.
Very narrow bands mark a quiet period. Traders watch these squeezes because volatility rarely stays low forever, but the bands do not show the direction of the next move.
Many traders use the middle line as a trend reference and the outer bands as context for stops and targets rather than as entries on their own.
Limitations
- Touching a band is not a buy or sell signal by itself.
- Moves larger than two deviations happen more often than a normal distribution would suggest, so the bands are not probability limits.
Settings and defaults
| Setting | Default | Allowed range |
|---|---|---|
| Source | Close | Open, High, Low, Close, High-low average, Typical price, OHLC average |
| Moving average | SMA | SMA, EMA, RMA |
| Length | 20 | 1 to 500 |
| Multiplier | 2 | 0 to 10 |
What it plots
Drawn on the price chart, on the same scale as the candles.
| Line | Unit | Drawn as | First value |
|---|---|---|---|
| Middle | Price | Line | after 20 candles |
| Upper | Price | Line | after 20 candles |
| Lower | Price | Line | after 20 candles |
Questions
What is Bollinger Bands (BB)?
Bollinger Bands place a band above and below a moving average at a distance set by the recent standard deviation of price. The bands widen when price swings grow and narrow when they shrink. They describe volatility and where price sits within its recent range.
How does TraderAI calculate Bollinger Bands (BB)?
TraderAI's defaults are a 20-period simple moving average of the close with bands 2 standard deviations away. The deviation is the population standard deviation (divided by N, not N - 1) of the last 20 source values, measured around their own mean. You can switch the middle line to an EMA or RMA; the deviation is still measured the same way. The first value appears after 20 candles.
What are the default settings of Bollinger Bands (BB)?
The defaults are Source: Close, Moving average: SMA, Length: 20, Multiplier: 2. You can change every setting on the live chart.
Can I use Bollinger Bands (BB) for free on TraderAI?
Yes. Every indicator in the library can be added to the free live chart. The free plan keeps up to 2 indicators active at the same time; Pro lets you combine more on one chart.
Educational content. Indicators describe past prices; they do not predict future prices and are not investment advice.