OPEN-SOURCE SCRIPT
Adaptive Dynamic BB Clouds [PRO] - Auto MA & Double Squeeze

Welcome to the Adaptive Dynamic BB Clouds. Traditional Bollinger Bands use a static standard deviation multiplier (usually 2.0) and a fixed moving average (SMA). However, market conditions are constantly shifting between ranging, trending, and highly volatile states.
This indicator introduces an Adaptive Algorithmic Engine that dynamically adjusts both the Basis Line (Moving Average) and the Band Width based on real-time Volume, Trend Strength (ADX), and Momentum (RSI).
🌟 Core Features:
1. Auto-Adaptive Basis Line (Smart MA)
Instead of locking you into one moving average, the script reads the market and automatically selects the best MA:
VWMA (Volume Weighted): Activates automatically when there is a significant volume surge (Relative Volume > 1.3) to track institutional money flow.
EMA (Exponential): Activates when a strong trend is detected (ADX > 25) to reduce lag and stick closer to the price.
SMA (Simple): Defaults to this during flat, ranging, or low-volume markets to avoid false signals and whipsaws.
2. Multi-Factor Dynamic Bands
The width of the bands is no longer static. The script calculates a real-time weight and magnitude based on:
Trend (ADX): Expands bands during strong trends.
Volume (RelVol): Expands bands during high volume breakouts.
Momentum (RSI): Expands bands when approaching overbought/oversold extremes.
If the market is dead, the bands contract tightly, filtering out market noise.
3. MTF Clean Clouds (Macro vs. Micro)
The script automatically detects a logical Lower Timeframe (LTF) based on your current chart. It plots the Macro (Current TF) bands as thick lines and the Micro (LTF) bands as thin lines. The space between them is filled with a clean gradient cloud. This visually represents the "Tension Zone" or dynamic Support/Resistance.
4. Double Squeeze & Squeeze Background
Squeeze Background: When the bands contract inside the Keltner Channels, the chart background turns gray, indicating a volatility compression (Accumulation phase).
Double Squeeze (Purple Diamond 💎): A rare confluence signal. When both the Macro TF and Micro TF enter a squeeze at the exact same time, a purple diamond appears. This indicates an extremely high probability of an imminent, explosive volatility expansion.
5. Real-Time Dashboard
A sleek, customizable panel on the chart displays real-time metrics for ADX, Relative Volume, and the current "Squeeze %" strength, so you always know what is driving the indicator.
⚙️ How to Use:
Accumulation: Look for gray backgrounds (Squeeze) and high Squeeze %. Do not trade breakouts yet; wait for the energy to build up.
Breakout: When the background color disappears and bands expand, trade in the direction of the breakout.
Confluence: A purple diamond 💎 followed by a volume surge (shown in green on the dashboard) is a strong signal for a major move.
Note: 100% Repaint-Free. Built securely with lookahead_off and na() fallbacks.
(Disclaimer: This script is for educational purposes only and does not guarantee financial returns. Always use proper risk management.)
This indicator introduces an Adaptive Algorithmic Engine that dynamically adjusts both the Basis Line (Moving Average) and the Band Width based on real-time Volume, Trend Strength (ADX), and Momentum (RSI).
🌟 Core Features:
1. Auto-Adaptive Basis Line (Smart MA)
Instead of locking you into one moving average, the script reads the market and automatically selects the best MA:
VWMA (Volume Weighted): Activates automatically when there is a significant volume surge (Relative Volume > 1.3) to track institutional money flow.
EMA (Exponential): Activates when a strong trend is detected (ADX > 25) to reduce lag and stick closer to the price.
SMA (Simple): Defaults to this during flat, ranging, or low-volume markets to avoid false signals and whipsaws.
2. Multi-Factor Dynamic Bands
The width of the bands is no longer static. The script calculates a real-time weight and magnitude based on:
Trend (ADX): Expands bands during strong trends.
Volume (RelVol): Expands bands during high volume breakouts.
Momentum (RSI): Expands bands when approaching overbought/oversold extremes.
If the market is dead, the bands contract tightly, filtering out market noise.
3. MTF Clean Clouds (Macro vs. Micro)
The script automatically detects a logical Lower Timeframe (LTF) based on your current chart. It plots the Macro (Current TF) bands as thick lines and the Micro (LTF) bands as thin lines. The space between them is filled with a clean gradient cloud. This visually represents the "Tension Zone" or dynamic Support/Resistance.
4. Double Squeeze & Squeeze Background
Squeeze Background: When the bands contract inside the Keltner Channels, the chart background turns gray, indicating a volatility compression (Accumulation phase).
Double Squeeze (Purple Diamond 💎): A rare confluence signal. When both the Macro TF and Micro TF enter a squeeze at the exact same time, a purple diamond appears. This indicates an extremely high probability of an imminent, explosive volatility expansion.
5. Real-Time Dashboard
A sleek, customizable panel on the chart displays real-time metrics for ADX, Relative Volume, and the current "Squeeze %" strength, so you always know what is driving the indicator.
⚙️ How to Use:
Accumulation: Look for gray backgrounds (Squeeze) and high Squeeze %. Do not trade breakouts yet; wait for the energy to build up.
Breakout: When the background color disappears and bands expand, trade in the direction of the breakout.
Confluence: A purple diamond 💎 followed by a volume surge (shown in green on the dashboard) is a strong signal for a major move.
Note: 100% Repaint-Free. Built securely with lookahead_off and na() fallbacks.
(Disclaimer: This script is for educational purposes only and does not guarantee financial returns. Always use proper risk management.)
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。