What Bollinger Bands measure
The three lines locate price relative to an average and dispersion within a data window. A common setting uses a 20-period simple average with two standard deviations on either side; that is not a proven optimum for every instrument. On an hourly chart, 20 periods means 20 bars rather than 20 days. Use the same input series, window and deviation convention when comparing platforms.
Formula and required inputs
For a simple-average version, calculate the mean of the selected N prices. Upper band = mean + k × standard deviation; lower band = mean − k × standard deviation. State whether inputs are closes, typical prices or something else, and whether deviation divides by N or N−1. Indicators with the same name may produce different numbers. This page's example uses closes and population deviation, dividing by N.
Reading a contraction or squeeze
Narrow bands describe low recent dispersion under the chosen settings. They do not determine the direction or timing of the next move. Record relative width and compare earlier windows for the same instrument and timeframe. If defining an expansion condition, specify it before evaluating outcomes and retain failed cases too; selecting only favorable screenshots introduces bias.
A band touch is not an instruction
A touch describes relative price location. Price can persist near a band or return toward the center. Do not automatically assign a reversal, an order or a success probability. Testing a rule requires entry, exit, costs and gap treatment. Evaluate new observations and different volatility regimes as well as the development period used to formulate the idea.
BandWidth and %b measure different quantities
In this exercise, percentage BandWidth = (upper − lower) / mean × 100. %b = (price − lower) / (upper − lower): 0 corresponds to the lower band and 1 to the upper band. If both bands coincide, the denominator of %b is zero and its value is undefined. A high %b is not a win probability; it locates price within that window.
Reviewing the indicator with AI
Provide the numerical series, settings, latest closed candle and UTC timestamp. Ask AIM or another assistant to reproduce the calculations and identify missing inputs. A screenshot alone does not establish that every close can be recovered accurately. Keep rules and history when studying a strategy; an explanation or simulation does not replace out-of-sample testing or establish future profitability.
Illustrative example
Mathematical exercise with five hypothetical closes: 98, 99, 100, 101 and 102. N = 5, k = 2. Mean = 100. Squared deviations sum to 4 + 1 + 0 + 1 + 4 = 10. Population variance = 10 / 5 = 2; deviation = √2 ≈ 1.4142. Bands ≈ 102.8284 and 97.1716. BandWidth ≈ 5.66%. At price 102, %b ≈ 0.8536. The artificial inputs check the formula; they are not recommended settings or an actual trade.
Review checklist
- Identify the instrument, timeframe and latest closed-bar timestamp.
- Check price source, N, multiplier and average type.
- Reproduce at least one window from numerical inputs.
- Do not turn %b into probability or a touch into an order.
- Evaluate costs and out-of-sample data before drawing conclusions.