Quantzee

Bollinger Bands Pro+ — Squeeze & %B

Bollinger Bands Pro+ guide — Keltner squeeze detection with a duration counter, breakout-direction bias, Trend/Reversion classifier, %B divergence & MTF.

1) Getting Started

How do I add the indicator to my chart?

On TradingView, go to Indicators → Invite-only scripts → Bollinger Bands Pro+ (Quantzee).

If you don’t see it, ensure your TradingView username has been granted access after subscribing.

Which markets and timeframes does it support?

Works on all symbols and all timeframes — stocks, indices, futures, forex, and crypto. The multi-timeframe dashboard requests data with lookahead off.


2) Core Concept

What makes Bollinger Bands Pro+ different from standard Bollinger Bands?

The bands themselves are standard Bollinger Bands (SMA basis ± standard deviations). Pro+ adds the four things BB traders constantly bolt on from separate indicators:

  1. Squeeze detection with a duration counter — Keltner-based compression, with a bar count.
  2. A breakout direction bias — a momentum read that projects the breakout side at release.
  3. A Trend/Reversion mode classifier — driven by %B band-walking.
  4. A %B divergence engine — pivot-based bullish/bearish divergences.

Plus a multi-timeframe squeeze dashboard.


3) Squeeze Detection with Duration Counter

A squeeze is flagged when the Bollinger Bands contract inside a Keltner Channel (EMA ± ATR multiple) — the classic compression definition — and the chart background highlights it.

The dashboard additionally counts how many bars the current squeeze has lasted. This matters because longer compressions tend to precede larger expansions, yet almost no squeeze tool quantifies compression duration for you.


4) Breakout Direction Bias

A momentum reading — a linear regression of price against a blend of its mid-range and mean — is computed continuously.

  • During a squeeze, the dashboard shows the current bias.
  • On the bar the squeeze releases, a directional ▲/▼ signal prints according to that momentum — giving you the projected breakout side at the moment of release rather than waiting for an extended move.

The bias is a momentum read, not a prediction guarantee.


5) Market Mode Classifier

The script monitors %B and automatically labels the market:

ModeConditionDashboard labelImplication
Trend (up-walk)%B above 0.8 for at least the threshold number of bars inside the windowTrend ▲A band touch is continuation — do not fade it
Trend (down-walk)%B below 0.2 for at least the threshold number of bars inside the windowTrend ▼A band touch is continuation — do not fade it
ReversionNeither band-walk condition metReversionA band touch is a mean-reversion candidate

The classifier triggers on either side of the bands — an up-walk (%B above 0.8) or a down-walk (%B below 0.2). Defaults: window 8 bars, band-walk threshold 5 bars. The band fill color changes with the mode (Trend = orange fill, Reversion = blue fill). This addresses the single most common Bollinger mistake: fading band touches during a band-walk.


6) %B Divergence Engine

Pivot-based detection of:

  • Bullish divergence — price lower low, %B higher low.
  • Bearish divergence — price higher high, %B lower high.

Both are drawn directly on the price chart with connecting lines and labels. %B divergences capture cases where price makes a new extreme but with less penetration of the bands — a weakening move. They are most useful in Reversion mode and near squeeze extremes.


7) Multi-Timeframe Squeeze Dashboard

The panel shows which of five user-selected timeframes are currently in a squeeze. Simultaneous compression across multiple timeframes — a “stacked squeeze” — marks the highest-energy pre-breakout conditions.


8) Non-Repainting Behavior

Do the signals repaint?

No.

  • Squeeze states and breakout signals are evaluated from completed-bar values.
  • Divergence pivots confirm a set number of bars after the pivot forms (configurable, default 5) and never repaint once printed.
  • Multi-timeframe data is requested with lookahead off.

For alerts, “Once per bar close” is the recommended trigger setting.


9) Settings

Defaults in brackets reflect the shipped script.

  • Bollinger Core: Length [20], StdDev Multiplier [2.0], Source [close].
  • Squeeze Engine (Keltner-based): Keltner Length [20], Keltner ATR Multiplier [1.5], Highlight Squeeze Background [on], Show Breakout Signals on Squeeze Release [on].
  • Market Mode Classifier: Mode Window [8 bars], Band-Walk Threshold [5 bars in window].
  • %B Divergence: Show %B Divergences [on], Pivot Lookback Left [5], Pivot Lookback Right [5], Min Bars Between Pivots [5], Max Bars Between Pivots [60].
  • Dashboard: Show Dashboard [on], Position [Top Right], five timeframes [5m, 15m, 1H, 4H, D].

10) Alerts

Seven alert conditions are available:

  1. Squeeze started
  2. Bullish squeeze release
  3. Bearish squeeze release
  4. Trend mode up
  5. Trend mode down
  6. Bullish %B divergence
  7. Bearish %B divergence

Set them with “Once per bar close” for confirmed signals. Alerts can be routed to email, mobile push, or webhooks for automation.


11) Best Practices

  • Wait for the squeeze: the longer the bar counter runs, the more significant the eventual expansion tends to be.
  • Read the bias while the squeeze is on; the printed ▲/▼ on release is the confirmation.
  • Respect the mode: in Reversion mode band touches are mean-reversion candidates; in Trend mode they are continuation — do not fade them.
  • Use divergences in context: a bearish %B divergence during an upward band-walk is an early caution, not an automatic short.
  • Stack timeframes: when your trading timeframe and one or two higher timeframes compress simultaneously, releases tend to travel further.

12) Notes

Bollinger Bands Pro+ is a technical analysis tool, not financial advice and not a complete trading system. The breakout bias is a momentum read, not a prediction guarantee. Always apply your own risk management. Works on all symbols and timeframes.