Bollinger Band Width Volatility Strategy: How to Build It in Arrow Algo

Bollinger Band Width Volatility Strategy: How to Build It in Arrow Algo

Most traders meet Bollinger Band Width through the squeeze. A Bollinger Band Width strategy can do far more than spot a squeeze. The indicator is a clean, normalised read on current volatility. It compares the market with its own recent past. That makes it a regime detector, an exit trigger and a sizing input. This guide covers all three. If you want the squeeze itself, our Bollinger Band squeeze strategy post goes deep on that one setup.

Why Volatility Is a Regime, Not a Signal

Volatility does not tell you which way price will go. It tells you what kind of market you are in. Quiet markets reward patience and breakout entries. Loud markets reward mean reversion and tight risk. The same entry rule produces opposite results in the two states.

That is the core idea behind a Bollinger Band Width strategy. You are not trading BBW. You are letting BBW decide which rules are allowed to trade. Traders who skip this step run a trend system through chop and a reversion system through a trend. Both lose. Neither is a bad system. They were just switched on at the wrong time.

What Bollinger Band Width Actually Measures

Bollinger Band Width is the gap between the upper and lower Bollinger Bands, divided by the middle band. The division is the important part. It turns a dollar gap into a percentage. A BBW of 0.08 means the bands are 8% of price apart. That number means the same thing on Bitcoin at $86,000 as on XRP at $1.50.

The bands themselves sit two standard deviations either side of a 20-period moving average. Standard deviation grows when candles get bigger and shrinks when they get smaller. So BBW is a smoothed, normalised volatility gauge. It falls during consolidation and rises during expansion. John Bollinger describes the full construction on bollingerbands.com.

Four steps from price to a volatility reading: BBW 0.367Worked on Bitcoin's latest daily candle, 24 Nov 2026, with the standard 20-period,2-deviation settings.Middle band20-day average ofcloses: $67,4861DeviationStandarddeviation ofthose 20 closes:$6,1982Outer bandsUpper $79,881,lower $55,091(mid ± 2deviations)3Width($79,881 −$55,091) ÷$67,486 = 0.367,or 36.7% of price4Data: BTC-USD daily candles from Coinbase. Calculated from the closes.
Dividing the gap by the middle band is what makes BBW comparable across assets. Hover a step for detail

What BBW is not: it is not a direction indicator. It is not an overbought or oversold measure. A high BBW reading on a rally and a high reading on a crash look identical. That is a feature. It means you can use BBW to filter without it fighting your directional logic.

Three Ways to Trade With Bollinger Band Width

1. The Regime Switch

Build two small strategies. One is a breakout entry. One is a mean reversion entry. Then put BBW in front of both.

When BBW is low relative to its own recent history, the breakout rules are live. The reversion rules are off. When BBW is high, swap them. Low volatility compresses energy. The eventual move tends to run. High volatility means stretched moves that tend to snap back.

“Low” and “high” need a definition. The cleanest is relative. Compare today’s BBW to its lowest and highest values over the past 120 candles. If it sits in the bottom quarter of that range, call the regime quiet. If it sits in the top quarter, call it loud. In between, trade nothing or trade smaller. This avoids hard-coded thresholds that only fit one asset.

Quiet 66% of the time, loud 10%, the rest in betweenBitcoin daily, Dec 2025 – Nov 2026. BBW(20, 2) ranked inside its own 120-day range: bottomquarter is quiet, top quarter is loud.$60k$80kPrice0.000.200.40BBW· 120-day ceiling· 120-day floorDec 25Mar 26May 26Aug 26Nov 26Data: BTC-USD daily candles from Coinbase. Regimes labelled, not traded: this is not a backtest.
The regime comes from where BBW sits in its own range, not from a fixed number. Hover a shaded stretch for its dates

2. The Expansion Exit

A trend trade is going well. The bands have blown wide open. BBW is at a six-month high. That is usually not the moment to add. It is often the moment to leave.

Volatility expands fastest near the end of a move, when late entrants pile in and stops cascade. StockCharts notes that BBW peaks frequently line up with trend exhaustion. An exit rule that closes or halves the position when BBW crosses above its 120-candle maximum catches that. You give up the last leg sometimes. You also skip the reversal that gives back half the trade.

Pair this with a trailing stop. Let the trail handle normal pullbacks. Let the BBW rule handle the blow-off.

3. Volatility-Scaled Sizing

BBW can also set position size. When BBW is low, a fixed-percentage stop sits close to price in dollar terms, so a normal position is fine. When BBW is high, that same stop sits far away, and a normal position carries too much risk.

Scale size inversely to BBW. Divide a base position by the ratio of current BBW to its 120-candle average. Twice the usual volatility means half the usual size. This keeps dollar risk roughly constant across regimes. It is the same logic as ATR-based sizing, with a measure that is already normalised to price.

Same rule, position size from 34% to 310% of baseSize = base × (120-day average BBW ÷ current BBW), on Bitcoin daily, Dec 2025 – Nov 2026.Loud markets shrink the position.0%100%200%300%Dec 25Mar 26May 26Aug 26Nov 26Base size34%310%Data: BTC-USD daily candles from Coinbase. Formula applied to real BBW; no trades are simulated.
Scaling by BBW shrinks the position when volatility is high. Hover a marker for the date and reading

Setting the Thresholds Without Curve-Fitting

The danger with any volatility strategy is tuning the thresholds until the backtest looks perfect. A 0.047 cutoff that worked on one year of ETH data is a coincidence, not a rule.

Three guardrails help. Use relative thresholds, as above, so the rule adapts to each asset. Test the lookback at 60, 120 and 250 candles and check the results are broadly similar. If 120 is brilliant and 100 is terrible, you have found noise. And run the same rule set on at least three unrelated pairs. A volatility regime filter that only works on one coin is not a volatility regime filter.

Mistakes That Flatter the Backtest

Treating BBW as a trigger. BBW crossing a level is a regime change, not an entry. Enter on price. Let BBW decide whether that entry is allowed.

Ignoring the middle zone. Most of the time BBW is neither low nor high. Strategies that force a regime label on every candle end up trading the mush. Stand aside in the middle, or size down hard.

Using the same lookback as the bands. The bands use 20 periods. The regime comparison should use far more, usually 100 or above. Comparing BBW to its own 20-candle range gives a jumpy label that flips every few days.

Forgetting that low BBW can stay low. A squeeze can last weeks. The regime switch turns on breakout rules. It does not promise a breakout tomorrow. Patience is built in. Capital is not tied up until price actually moves.

How to Build a Bollinger Band Width Strategy in Arrow Algo

Arrow Algo has a dedicated Bollinger Band Width block. Drop it on the canvas and connect your price feed. Set the period to 20 and the deviation to 2.

For the regime switch, add two Minimum In Period blocks and two Maximum In Period blocks. Feed BBW into both and set the lookback to 120. Now you have today’s BBW alongside its recent floor and ceiling. A Condition block compares BBW to the floor. If BBW is within a small margin of its 120-candle minimum, the quiet regime is active. A second Condition block does the same against the ceiling for the loud regime.

Those two conditions become gates. Wire the quiet-regime output into a Condition block using the AND operator, alongside your breakout entry signal. Wire the loud-regime output the same way into your mean reversion entry. Only one branch can fire at a time.

The regime switch as a chain of blocksQuiet gate shown. The loud gate copies it and feeds the mean reversion entry.BB WidthBollinger BandWidth block:period 20,deviation 2, onyour price feed1Min / Max In PeriodLookback 120: BBWfloor and ceiling2ConditionBBW within amargin of itsfloor: quietregime on3Condition (AND)Quiet regime ANDbreakout entrysignal4
The regime gate sits in front of the entry, so only one branch can fire

For the expansion exit, connect BBW to a Maximum In Period block set to 120 and a Crossover block. When BBW crosses above its previous maximum, the Crossover fires. Route that into your exit alongside a Trailing Stop block. Either one closes the trade.

For sizing, use a Math block to divide a Fixed Number by the ratio of BBW to its average. Pass the result to your order size input.

Then backtest it. Arrow Algo runs the strategy against exchange history from Binance, Coinbase or HyperLiquid. Compare the regime-switched version against each sub-strategy running alone. The switch should beat both. If it does not, the thresholds need work before the rules do.

What to Carry Into Your Own Test

  • Bollinger Band Width measures volatility as a percentage of price. It works across assets without re-tuning.
  • Use it as a regime filter that decides which rules may trade, not as an entry trigger.
  • Low BBW favours breakout entries. High BBW favours mean reversion or standing aside.
  • A BBW spike to a long lookback high is a strong exit signal for trend trades.
  • Scale size inversely to BBW to hold dollar risk steady.
  • Define thresholds relative to BBW’s own history, and test several lookbacks and pairs.

Disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.

Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who've made the switch to systematic trading.

See Arrow Algo first on Google. Add us as a preferred source and our articles show up more in your Top Stories.

Add as a preferred source on Google