OPEN-SOURCE SCRIPT
Dual Bollinger Bands

Dual Bollinger Bands
Dual Bollinger Bands is an advanced volatility-based indicator that plots two independent Bollinger Band sets on the same chart, allowing traders to analyze price behavior from multiple perspectives simultaneously.
Unlike standard Bollinger Bands, this indicator lets you configure each band set separately, making it especially useful for identifying asymmetric volatility, price compression/expansion zones, and dynamic support and resistance levels.
Key Features
Two fully independent Bollinger Bands
Each band has its own length, standard deviation multiplier, and moving average type.
Different price sources
BB1 can be calculated using High prices, while BB2 can use Low prices (or any source you choose), enabling a directional volatility envelope.
Custom Moving Average types
Choose between SMA, EMA, SMMA (RMA), WMA, or VWMA for each Bollinger basis.
Offset capability
Optional forward/backward offset allows visual projection or historical alignment analysis.
Clear visual separation
Each Bollinger set uses distinct colors and shaded areas for easy interpretation.
Overlay on price chart
Designed to work directly on the main chart for contextual market analysis.
How to Use
Volatility Analysis
Observe expansions and contractions between the two Bollinger sets to identify volatility regimes.
Dynamic Support & Resistance
Upper and lower bands can act as adaptive levels where price may react or revert.
Trend Context
When price consistently respects one side of a band set, it may indicate directional strength.
Mean Reversion & Breakout Zones
Convergence between bands may suggest compression, while rapid divergence can signal breakout conditions.
Best Use Cases
Intraday and swing trading
Volatility-based strategies
Trend-following or mean-reversion systems
Crypto, Forex, Indices, and Equities
Notes
This indicator does not generate signals by itself. It is designed to be used as a contextual volatility and structure tool, ideally combined with price action, market structure, or higher-level trading frameworks.
Dual Bollinger Bands is an advanced volatility-based indicator that plots two independent Bollinger Band sets on the same chart, allowing traders to analyze price behavior from multiple perspectives simultaneously.
Unlike standard Bollinger Bands, this indicator lets you configure each band set separately, making it especially useful for identifying asymmetric volatility, price compression/expansion zones, and dynamic support and resistance levels.
Key Features
Two fully independent Bollinger Bands
Each band has its own length, standard deviation multiplier, and moving average type.
Different price sources
BB1 can be calculated using High prices, while BB2 can use Low prices (or any source you choose), enabling a directional volatility envelope.
Custom Moving Average types
Choose between SMA, EMA, SMMA (RMA), WMA, or VWMA for each Bollinger basis.
Offset capability
Optional forward/backward offset allows visual projection or historical alignment analysis.
Clear visual separation
Each Bollinger set uses distinct colors and shaded areas for easy interpretation.
Overlay on price chart
Designed to work directly on the main chart for contextual market analysis.
How to Use
Volatility Analysis
Observe expansions and contractions between the two Bollinger sets to identify volatility regimes.
Dynamic Support & Resistance
Upper and lower bands can act as adaptive levels where price may react or revert.
Trend Context
When price consistently respects one side of a band set, it may indicate directional strength.
Mean Reversion & Breakout Zones
Convergence between bands may suggest compression, while rapid divergence can signal breakout conditions.
Best Use Cases
Intraday and swing trading
Volatility-based strategies
Trend-following or mean-reversion systems
Crypto, Forex, Indices, and Equities
Notes
This indicator does not generate signals by itself. It is designed to be used as a contextual volatility and structure tool, ideally combined with price action, market structure, or higher-level trading frameworks.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.