The three lines, exactly as computed
The middle line is a simple moving average of closing prices over a lookback, commonly twenty periods. The outer lines are that same average plus and minus a multiple of the standard deviation of the closes in the identical window, commonly two. Standard deviation is a measurement of scatter: it compares each close in the window against the average of the window, squares the differences, averages them and takes the square root.
Three things follow immediately. The outer lines move because the measured scatter moves, so they are not fixed references. They are computed from the same closes that produced the average, so the relationship between price and the bands is partly circular. And because the deviation term squares each difference before averaging, a single unusually large candle influences the width far more than several ordinary ones. That last property matters a great deal on gold, where one release driven candle can be several times the size of its neighbours, and it explains behaviour that otherwise looks like the indicator malfunctioning.
Why a band touch is not an overbought reading
A band set two deviations from the average is, by construction, drawn wide enough to contain the bulk of the closes in its own window. Price reaching it is therefore an expected event rather than a rare one. Calling a touch overbought asserts something about value, and nothing in the calculation refers to value. The width is a statement about recent scatter and the position of the middle line is a statement about the recent average. Neither contains any information about what a fair price would be.
There is a second problem with the overbought reading. Because the window is rolling, the bands adapt to whatever behaviour has recently prevailed. In a quiet stretch they contract until small moves reach them. In an active stretch they expand until large moves do not. So the same distance from the average can be a band touch on one day and well inside the band on another. If what you actually want is a measure of how stretched price is relative to its own recent behaviour, a normalised measure such as a stretch reading states it directly instead of leaving you to infer it from a line position.
Walking the band
The clearest demonstration that the outer line is not resistance is the behaviour traders call walking the band. In a strong directional stretch, closes sit on or beyond the upper line for a run of consecutive candles, and the line itself rises as the measured scatter increases. Each candle appears to be at an extreme, and each one is followed by another.
The mechanism is straightforward once you have the formula in mind. A series of large moves in one direction raises both the average and the measured deviation, so the upper line is being pushed up by the very candles that are touching it. This is the chase trap in its purest form, and it is where a band based entry does the most damage, because every signal to fade the move is generated by the move itself. It is also why anyone using the bands seriously pairs them with a read on whether the market is trending or ranging before deciding what a touch means.
Bandwidth and the squeeze
Bandwidth is the distance between the outer lines expressed relative to the middle line, which makes it comparable across price levels. When bandwidth falls, the closes in the window have been clustered tightly. That is a genuine and useful observation, because contraction and expansion of volatility do cluster in time, so a quiet stretch tends to be followed by a more active one.
What a contraction cannot tell you is which way the expansion goes. The calculation has no directional term in it at all. Standard deviation treats a close above the average and a close below it identically, because the differences are squared. Any directional conclusion drawn from a squeeze has been imported from somewhere else, usually from the trader's existing bias. This is the same limitation that applies to every distance or volatility estimate, including the chart tools on this site that estimate how far a move may travel without claiming to know its direction. Treat a squeeze as a statement about timing and position sizing, not about which side to take.
Percent b, and what it does not tell you
Percent b expresses where the latest close sits between the two outer lines on a scale where the lower line is zero and the upper line is one. A value above one means the close is outside the upper line, below zero means outside the lower. It is a convenience: it converts a visual judgement about proximity into a number you can set a condition on.
What it does not do is remove the problem described earlier. Because both endpoints of the scale move, a given percent b value means different things in different conditions. Percent b near one during a quiet stretch means price has moved a little. The same value during an active stretch means it has moved a lot. If you want to compare today against last month, percent b is the wrong tool, because the denominator changed. It answers one question well, namely where price sits inside the current envelope, and it should not be asked anything else. The same caution applies to any ratio whose scale is recalculated every bar.
Width reacts after the candle, never before
The lag is structural and worth seeing drawn. The deviation term is computed from closes that have already printed, so the width can only respond to a large move once that move is in the window. A violent gold candle on a release therefore produces the sequence in the wrong order from a trader's point of view: the move happens while the bands are still narrow, then the bands flare out afterwards and stay wide while the market calms down again.
Two practical consequences. A stop or a target placed by reference to band width is being set using a measurement that describes the recent past, which is the same objection that applies to any volatility derived distance including an average true range stop. And a squeeze identified after the expansion has begun is not a squeeze, it is a memory. If a band based rule looks excellent in review, check whether the width used in the test included the candle the test was trading.
What the bands are actually good for
Used honestly, they do three jobs. They give you a visual record of when volatility was compressed and when it expanded, which helps you decide when a range based approach or a breakout based approach is even applicable. They give you a slow reference in the middle line, which behaves like any other moving average and can be used the same way. And they let you compare the size of the current move against the recent envelope rather than against your impression of it.
What they will not do is tell you when price has gone too far, because too far is not a concept the formula contains. The limitation to remember is the circularity: price makes the bands, so the bands cannot independently judge price. Keep them as a volatility display, take the directional decision from structure and location, and the bands will stop appearing to fail. They were never doing the job that was being asked of them.
FAQ
Does price touching the upper band mean gold is overbought?
No. The outer line is placed by a measurement of how scattered recent closes have been, so reaching it is ordinary behaviour the construction expects. In a directional stretch, closes can sit on or beyond the line for many candles in a row while the line itself keeps rising. Nothing in the calculation refers to value.
What does a squeeze tell me?
That recent closes were tightly clustered, which is a statement about volatility and nothing else. The standard deviation term squares each difference from the average, so upward and downward deviations count the same. Direction has to come from somewhere other than the bands, and any squeeze based directional call has imported a bias from elsewhere.
Which settings should I use on gold?
There is no correct answer, and anybody quoting one is quoting a convention. A shorter lookback makes the bands more reactive and produces more touches. A larger multiple makes touches rarer. What matters more is fixing the choice and not adjusting it mid trade, because changing the multiple changes whether a touch exists at all.
Can I use the middle band as support in a trend?
You can use it the way you would use any moving average of the same length, as a slow reference that tells you how far price has travelled from its recent average. Just remember that it is an average of closes rather than a level where anything traded, so it carries no memory of where buyers or sellers actually appeared.
Why do the bands look useless around news?
Because the width is computed from closes that have already printed. A large release candle happens while the envelope is still narrow, and the envelope only widens afterwards, staying wide while the market settles. The display is describing the past accurately. The problem is expecting it to describe the candle currently forming.
ⓘ See these ideas on real price: open the free XAUUSD live chart.