OPEN-SOURCE SCRIPT

Bollinger Band Toolkit

103
Bollinger Band Toolkit

An advanced, adaptive Bollinger Band system for traders who want more context, precision, and edge.

This indicator expands on the classic Bollinger Bands by combining statistical and volatility-based methods with modern divergence and squeeze detection tools. It helps identify volatility regimes, potential breakouts, and early momentum shifts — all within one clean overlay.

🔹 Core Features
1. Adaptive Bollinger Bands (σ + ATR)

Classic 20-period bands enhanced with an ATR-based volatility adjustment, making them more responsive to true market movement rather than just price variance.

Reduces “overreacting” during chop and avoids bands collapsing too tightly during trends.

2. %B & RSI Divergence Detection

🟢 Green dots: Positive %B divergence — price makes a lower low, but %B doesn’t confirm (bullish).

🔴 Red dots: Negative %B divergence — price makes a higher high, but %B doesn’t confirm (bearish).

✚ Red/green crosses: RSI divergence confirmation — momentum fails to confirm the price’s new extreme.
These signals highlight potential reversal or slowdown zones that are often invisible to the naked eye.

3. Bollinger Band Squeeze (with Volume Filter)

Yellow squares (■) show periods when Bollinger Bands are at their narrowest relative to recent history.

Volume confirmation ensures the squeeze only triggers when both volatility and participation contract.

Often marks the “calm before the storm” — breakout potential zones.

4. Multi-Timeframe Breakout Markers

Optionally displays breakouts from higher or lower timeframes using different colors/symbols.

Lets you see when a higher timeframe band break aligns with your current chart — a strong trend continuation signal.

5. Dual- and Triple-Band Visualization (±1σ, ±2σ, ±3σ)

Optional inner (±1σ) and outer (±3σ) bands provide a layered volatility map:

Price holding between ±1σ → stable range / mean-reverting behavior

Price riding near ±2σ → trending phase, sustained momentum

Price touching or exceeding ±3σ → volatility expansion or exhaustion zone

This triple-band layout visually distinguishes normal movement from statistical extremes, helping you read when the market is balanced, expanding, or approaching its limits.

⚙️ Inputs & Customization

Choose band type (SMA/EMA/SMMA/WMA/VWMA)

Adjust deviation multiplier (σ) and ATR multiplier

Toggle individual features (divergence dots, squeeze markers, inner bands, etc.)

Multi-timeframe and colour controls for advanced users

🧠 How to Use

Watch for squeeze markers followed by a breakout bar beyond ±2σ → volatility expansion signal.

Combine divergence dots with RSI or price structure to anticipate slowdowns or reversals.

Confirm direction using multi-timeframe breakouts and volume expansion.

💬 Why It Works

This toolkit transforms qualitative chart reading (tight bands, hidden divergence) into quantitative, testable conditions — giving you objective insights that can be backtested, coded, or simply trusted in live setups.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน