OPEN-SOURCE SCRIPT

Bollinger BandWidth With Alerts

761
Bollinger BandWidth (BBW) + Compression/Exhaustion Alerts

This indicator plots Bollinger BandWidth (BBW) to help you identify volatility regimes: when the market is compressing (coiling) vs expanding (in price discovery).

What it shows

BBW (Blue): Current Bollinger BandWidth as a % of the basis (SMA).

Highest Expansion (Red): The highest BBW value over the last N bars (lookback).

Lowest Contraction (Green): The lowest BBW value over the last N bars (lookback).

Key Features

✅ Compression Detection
Triggers when BBW is near the Lowest Contraction line (volatility squeeze / balance phase).

✅ Exhaustion / Peak Expansion Detection
Triggers when BBW is near the Highest Expansion line (strong expansion / potential late-stage move).

✅ Configurable “Near Zone” Thresholds
Use:

Near Lowest Contraction (%) → how close BBW must be above the contraction extreme

Near Highest Expansion (%) → how close BBW must be below the expansion extreme

Alerts Included

BBW Compression (Near Lowest Contraction)

BBW Exhaustion (Near Highest Expansion)

Alerts are designed to be used with “Once per bar close” to avoid noise during bar formation.

How to use (simple)

Compression alert (C): Start watching for breakout / value setups (market is coiling).

Exhaustion alert (E): Be cautious chasing moves; watch for transitions or rebalancing.

Inputs

BB Length, Source, StdDev

Expansion/Contraction lookback length (hidden by default)

Near-zone thresholds for compression/exhaustion alerts

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.