Module 4 · Lesson 7 of 12 · Volume and indicators · About 5 minutes
Bollinger Bands, Keltner Channels and ATR: Measuring Volatility
On this page
Before you read: MACD Explained: Lines, Histogram and What Crosses Mean
What you will learn
- How Bollinger Bands use standard deviation to draw bands around an average.
- How average true range is calculated and how Keltner Channels use it.
- What a band “squeeze” describes, and why touching a band is not a signal.
Why measure volatility at all?
Would a $2 move mean the same thing in a quiet market and a wild one?
Volatility is how much price tends to move. A move that is large for a quiet market can be ordinary for a busy one. Volatility measures put moves in context, and many traders use them to size positions and set distances for stop orders. The position size lesson shows how the distance to a stop changes the size of a position for the same risk.
How are Bollinger Bands built?
If you drew lines a fixed number of standard deviations around an average, how would they behave when markets get busier?
Bollinger Bands, developed by John Bollinger, have three lines. The defaults are:
- Middle band: a 20-period simple moving average of closes.
- Upper band: the middle band plus 2 standard deviations of the same 20 closes.
- Lower band: the middle band minus 2 standard deviations.
When closes spread out, the standard deviation grows and the bands widen. When closes bunch together, the bands narrow. Two related measures are bandwidth (the distance between the bands divided by the middle band) and %B (where price sits between the bands, with 0 at the lower band and 1 at the upper).
You may have read that about 95% of values in a normal distribution fall within two standard deviations of the mean. That is not a forecast about these bands. Each band is built from a recent average of closes and the spread of those closes. The next price is not a random draw from a known, fixed distribution just because the formula uses standard deviation. Even if returns were normally distributed, price levels would not follow from that. Trends, dependence between bars, estimated inputs and fat tails all matter. John Bollinger’s own published rules say to make no statistical assumptions based on the standard deviation calculation. This lesson does not establish any next-bar coverage rate or confidence interval.
Fictional hand example, deliberately length 4 for calculation rather than changing the stated 20 default: closes 98, 100, 100, 102 price units have mean 100. Using population divisor 4, the squared deviations 4+0+0+4 sum 8, variance 2, SD √2≈1.414214. At multiplier 2, the band is 100±2√2, or 97.171573–102.828427. Its width≈5.656854; normalized bandwidth≈0.05656854 (5.656854% of the middle). The last 102 close has %B=(102−97.171573)/5.656854≈0.853553. An invented next close of 110 would sit outside these bands, which were calculated before that bar. Including 110 would create a new rolling window with a new mean and standard deviation. One example cannot confirm or refute any coverage rate; it only shows which quantity was calculated.
Volatility bands diagram
Illustrative diagram constructed for teaching. Not real market data.
The diagram shows a fictional price path with Bollinger Bands. The bands narrow during a quiet stretch and widen when moves get larger, while the ATR panel below rises at the same time. It is constructed for teaching and is not real market data.
How is ATR calculated?
What is the full distance price traveled in a bar, including any gap from the prior close?
True range for one bar is the largest of three distances:
- high − low;
- the distance from the high to the prior close;
- the distance from the low to the prior close.
The second and third cover gaps: if a market opens well above yesterday’s close, the bar’s own high-low range understates how far price moved. Average true range (ATR), introduced by J. Welles Wilder, is a smoothed average of true range, usually over 14 bars. ATR is in price units and has no direction: it rises in busy markets whether prices are rising or falling.
Example. Prior close $50, today’s high $53, low $51. High − low is $2, high − prior close is $3, low − prior close is $1. True range is $3.
Try it on a chart
- Find the Bollinger Bands on the price and the ATR panel below it.
- Find a stretch where the bands narrow and check what ATR did at the same time.
Charts and quotes are TradingView's data, not ours, and may be delayed.
How are Keltner Channels different?
What changes if the band width comes from ATR instead of standard deviation?
A Keltner Channel draws bands a multiple of ATR around an exponential moving average, commonly a 20-period EMA with bands 1.5 or 2 ATRs away. Their width inputs differ: ATR uses bar ranges/gaps while close-based standard deviation uses dispersion of closes. Relative smoothness depends on lengths, smoothing and the price path; there is no universal guarantee that one channel is smoother under every configuration.
What is a squeeze?
What happens to the bands when a market goes quiet for a while?
A squeeze is a period when Bollinger Bands narrow. John Bollinger’s published rules use BandWidth to identify it. Some traders instead define it as the Bollinger Bands moving inside a Keltner Channel. These definitions need not agree, so state which one you use. A squeeze describes low recent volatility. It does not say when volatility will expand or in which direction, and this lesson measures no frequency of later expansion.
What this does not tell you about volatility bands
- A touch of a band is not a sign that price will reverse or continue. In strong trends, price can ride along a band for a long time.
- Volatility measures look backward. They do not tell you how much the next bar will move.
- A squeeze does not show the direction of any later move.
- Nothing here is a signal to buy or sell.
Method in Practice: ATR sets the distance, and the size
Fictional example. John, Harbor Index futures, the prices, times, costs and results are all invented for teaching. This shows how a written plan can be built and tested. It is not a recommendation, and nothing here says how often this idea works.
Try it on a real chart. Look at the chart in this lesson, then test this idea yourself on past sessions with bar replay. Keep your own count, including the days with no trade.
The idea. ATR measures how far price has typically moved per bar recently. John uses it for two numbers in his plan: how far away his "wrong if" sits, and so how many contracts fit inside his $150 cap. Same entry rule, three days with different ATR, and three different sizes, including zero.
John's plan
- Setup
- opening range high (08:30–09:00), marked at 09:00
- Enter if
- a 5-minute bar closes above the opening range high. Buy.
- Wrong if
- price trades 1.5 ATR(14, 5-minute) below the entry (stop order)
- Manage
- take half at entry + 1.5 ATR, the rest at entry + 3 ATR or by 14:30
- Risk
- $150 maximum, costs included. Contracts = $150 ÷ the cost per contract, rounded down
Three outcomes
-
Worked: ATR 0.30, so 2 contracts → +$125
-
Failed: ATR 0.60, so only 1 contract, stopped out → −$100, inside the limit
-
No trade: ATR 1.10. One contract would cost $175, more than the cap, so 0 contracts → $0
Show the full replays
| Item | Plan |
|---|---|
| Context | Opening range 08:30–09:00 |
| Entry condition | A 5-minute bar closes above the opening range high. Buy at market after that close |
| Wrong if | A stop order 1.5 × ATR(14, 5-minute, read at the entry bar's close) below the entry fill, rounded down to a tick |
| Management | 2 contracts: half at entry + 1.5 ATR (limit), stop for the rest moves to the entry price, rest at entry + 3 ATR (limit). 1 contract: all at entry + 1.5 ATR. Time limit 14:30 CT |
| Risk cap and size | $150. Cost per contract = (entry − stop + 1 tick of slippage) × $100 + $5. Contracts = $150 ÷ cost, rounded down, at most 2 |
| Not trading if | Scheduled major release within the hour, size works out to 0, or no setup by 12:00 CT |
Replay A: worked (ATR 0.30)
| Time (CT) | What happened | John |
|---|---|---|
| 09:15–09:20 | Closes 100.95 above the opening range high. ATR 0.30 | Filled 101.00. Stop 101.00 − 0.45 = 100.55. Cost (0.45 + 0.05) × $100 + $5 = $55, so 2 contracts |
| 09:20–10:30 | Trades 101.45 (+1.5 ATR) | Sells 1 at 101.45 (limit). Stop for the other moves to 101.00 |
| 10:30–12:20 | Trades 101.90 (+3 ATR) | Sells the last 1 at 101.90 (limit) |
Result after costs: +0.45 point = +$45, +0.90 point = +$90, commissions −$10. Net +$125.
Replay B: failed (ATR 0.60)
| Time (CT) | What happened | John |
|---|---|---|
| 09:25–09:30 | Closes 101.05 above the opening range high. ATR 0.60 | Filled 101.10. Stop 101.10 − 0.90 = 100.20. Cost $100, so 1 contract |
| 09:30–10:20 | Falls through 100.20 | Stop triggers, filled 100.15 |
Result after costs: −0.95 point = −$95, commission −$5. Net −$100. Journal: "A wider day meant a wider stop and half the size. The loss stayed inside the cap because the size shrank."
Replay C: no trade (ATR 1.10)
| Time (CT) | What happened | John |
|---|---|---|
| 09:10–09:15 | Closes 101.00 above the opening range high. ATR 1.10 | Stop would be 1.65 below. Cost $175 per contract, more than the $150 cap: 0 contracts |
| 09:15–12:00 | Swings two points both ways | No trade |
Result: $0. Journal: "Even one contract would break the cap. On a day like this, the honest size is zero."
Test it yourself
- Write the ATR length, bar size and multiple first. Then work out the size by hand for three different days.
- Replay the same entry rule on quiet and wild days. Log how often the size came out at zero.
- Compare with a fixed stop distance at the same cap. Notice which days each version skips.
Where it breaks
- ATR looks backward. The next bar can move much more (this lesson).
- A stop order can fill past its price.
- On wild days, an honest cap often means no trade at all (the no-trade replay).
Calculators: position sizerisk/rewardexpectancy
Reflection question: Does your position size change with volatility, or does your risk change instead?
Check yourself
- Prior close $30, high $31, low $28. What is the true range? Hint: compare all three distances.
- Why do Bollinger Bands widen when markets get busier? Hint: what happens to standard deviation?
- Why is “the next price has 95% probability of staying inside the current bands” not established merely by drawing 2 SD bands?
- Recompute the four-close example’s mean and variance. Would a newly included 110 leave the same window unchanged?
Reflect on your own process
- If your plan uses ATR to set stop distances or size, where is that rule written and how did you test it?
- Which squeeze definition, if any, does your checklist use, and is it stated precisely enough for someone else to apply?
- When you note a band touch in your journal, what do you record so you can review it honestly later?
- Does your position size change with volatility, or does your risk change instead?