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

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.