Bollinger Band Width Pass Node

BB Width — Series Input

IndicatorVolatilityPass

Overview

The Bollinger Band Width Pass Node measures the relative width of Bollinger Bands applied to any upstream numeric series. It normalises band separation by the middle band so the result is comparable across different magnitude series — making it useful for volatility regime detection on indicator outputs, not just raw price.

Low Band Width values indicate a consolidation or "squeeze"; rising values signal expanding volatility. This metric is the foundation of the Bollinger Band Squeeze strategy, generalised here to work on any data stream.

Formula

Band Width
BW = ( UB − LB ) / MB
Where UB, LB, and MB are the upper, lower, and middle Bollinger Bands computed over the input series using the specified period.

Parameters

ParameterTypeDefaultDescription
periodnumber20Lookback window for the underlying Bollinger Bands calculation.

Inputs & Outputs

SlotDirectionTypeDescription
inputInput{ values, timestamps }Any upstream numeric series
valuesOutput(number | null)[]Normalised band width per bar; nulls during warm-up
timestampsOutputnumber[]Unix timestamps aligned to the input series

Use Cases

Indicator Squeeze Detection

Detect periods of low volatility in any oscillator or moving-average output, signalling potential breakouts.

Cross-Instrument Volatility Comparison

Compare normalised width across multiple assets or time frames to rank by relative calm.

Regime Filter

Use a threshold on Band Width to switch between trend-following and mean-reversion strategies.

Tips & Best Practices

📉 Squeeze Threshold

A historically low BW (e.g. below 6-month percentile) often precedes a large directional move.

⚠️ Division by Zero

If the middle band is zero (constant series), BW returns null. Ensure your input series has meaningful variance.

Related Indicators