OPEN-SOURCE SCRIPT
Updated Bandes de Bollinger - Couleurs Dynamiques

Description
This indicator is an enhanced version of the classic Bollinger Bands. It allows traders to instantly visualize market volatility states (expansion or compression) by coloring each band independently based on its own direction.
Unlike standard indicators that color the background or use a single condition for both lines, this script focuses on the slope of each individual band to provide a more precise reading of price dynamics.
How It Works
The script analyzes the position of each band relative to its previous value (n-1):
Upper Band: Turns GREEN when it moves up (expanding upwards) and RED when it moves down (contracting downwards).
Lower Band: Turns GREEN when it moves down (expanding downwards) and RED when it moves up (contracting upwards).
Signal Interpretation
This independent coloring helps identify three market phases at a glance:
Volatility Expansion (Blast off): Both bands are GREEN. This typically occurs during a breakout or a violent impulsive move where bands open up in opposite directions.
Compression (Squeeze): Both bands are RED. The upper band is sloping down and the lower band is sloping up. The market is consolidating, often signaling an impending explosive move.
Trend: Colors are mixed. For instance, during a strong uptrend, the Upper Band will be Green (rising), but the Lower Band will often be Red (rising as well to follow price, rather than expanding downwards).
Settings
Users retain standard Bollinger Bands configuration:
Length: Period for the Moving Average (Default: 20).
Multiplier: Standard Deviation multiplier (Default: 2.0).
Source: Price data used (Default: Close).
Note
This tool is purely visual and does not repaint. It is designed to assist traders who rely on volatility analysis, mean reversion, or breakout strategies.
This indicator is an enhanced version of the classic Bollinger Bands. It allows traders to instantly visualize market volatility states (expansion or compression) by coloring each band independently based on its own direction.
Unlike standard indicators that color the background or use a single condition for both lines, this script focuses on the slope of each individual band to provide a more precise reading of price dynamics.
How It Works
The script analyzes the position of each band relative to its previous value (n-1):
Upper Band: Turns GREEN when it moves up (expanding upwards) and RED when it moves down (contracting downwards).
Lower Band: Turns GREEN when it moves down (expanding downwards) and RED when it moves up (contracting upwards).
Signal Interpretation
This independent coloring helps identify three market phases at a glance:
Volatility Expansion (Blast off): Both bands are GREEN. This typically occurs during a breakout or a violent impulsive move where bands open up in opposite directions.
Compression (Squeeze): Both bands are RED. The upper band is sloping down and the lower band is sloping up. The market is consolidating, often signaling an impending explosive move.
Trend: Colors are mixed. For instance, during a strong uptrend, the Upper Band will be Green (rising), but the Lower Band will often be Red (rising as well to follow price, rather than expanding downwards).
Settings
Users retain standard Bollinger Bands configuration:
Length: Period for the Moving Average (Default: 20).
Multiplier: Standard Deviation multiplier (Default: 2.0).
Source: Price data used (Default: Close).
Note
This tool is purely visual and does not repaint. It is designed to assist traders who rely on volatility analysis, mean reversion, or breakout strategies.
Release Notes
add background fil for 3 colors or just 1 Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.