OPEN-SOURCE SCRIPT

BB Squeeze - HighQTools

874
BBW Squeeze — HighQTools

As always, if anyone has any tips or additional features they'd like to see, feel free to reach out!

Overview

The BBW Percentile Squeeze highlights periods of exceptionally compressed volatility by measuring Bollinger Band Width (BBW) and ranking it within a rolling historical percentile. When BBW falls into the lowest portion of its own distribution, price is statistically “tight” relative to recent history—a condition that often precedes volatility expansion.

Instead of plotting an oscillator in a separate pane, this tool expresses information directly on the price chart by changing bar colors during squeeze conditions, keeping charts clean and execution-focused.

How It Works

Standard Bollinger Bands are calculated using a configurable length and standard deviation.

Band width is normalized and evaluated against a rolling lookback window.

The current width is converted into a percentile rank (0–100):

Lower percentile = tighter volatility

Higher percentile = expanded volatility

When the percentile drops below the user-defined threshold, the market is considered to be in a squeeze.

An optional RTH-only mode allows the percentile calculation to consider Regular Trading Hours bars only, which is especially useful for futures traders who want to ignore overnight volatility distortions.

Visual Signals

Squeeze Bars
Bars are recolored when BBW percentile falls below the selected threshold, indicating extreme compression.

Release Bar (optional)
The first bar exiting the squeeze can be highlighted separately, marking the resolution of compression.

No oscillator, no bands, no shapes—only context applied directly to price.

How to Use It

The squeeze itself is not a trade signal.

Squeeze conditions indicate stored energy—expect range expansion, not direction.

Focus on:

Market structure

Higher-timeframe context

Volume, delta, or acceptance/rejection

The release from squeeze often provides the best opportunity, especially when aligned with directional bias or structural breaks.

For best results, use this tool as a context filter alongside execution setups rather than as a standalone entry signal.

Recommended Settings

BB Length: 10

Std Dev: 2.0

Percentile Lookback: 200–300 bars

Squeeze Threshold: 5-10 percentile

RTH-only: Enabled for index futures

Disclaimer

This indicator is designed to provide context, not predictions. Always combine volatility information with sound risk management and a complete trading plan.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.