OPEN-SOURCE SCRIPT
Calm before the Storm

Calm before the Storm - Bollinger Bands Volatility Indicator
What It Does
This indicator identifies and highlights periods of extremely low market volatility by analyzing Bollinger Bands distance. It uses percentile-based analysis to find the "quietest" market periods and highlights them with a gradient background, operating on the premise that low volatility periods often precede significant price movements.
How It Works
Volatility Measurement: Calculates the distance between Bollinger Bands upper and lower boundaries
Percentile Analysis: Analyzes the lowest X% of volatility periods over a configurable lookback period (default: lowest 40% over 200 bars)
Visual Highlighting: Uses gradient opacity to show volatility levels - the lower the volatility, the more opaque the background highlighting
Adaptive Threshold: Automatically calculates what constitutes "low volatility" based on recent market conditions
Who Should Use It
Primary Users:
Breakout Traders: Looking for consolidation periods that may precede significant moves
Options Traders: Seeking low implied volatility periods before volatility expansion
Swing Traders: Identifying accumulation/distribution phases before trend continuation or reversal
Range Traders: Spotting tight trading ranges for mean reversion strategies
Trading Styles:
Volatility-based strategies
Breakout and momentum trading
Options strategies (volatility plays)
Market timing approaches
When to Use It
Market Conditions:
Consolidation Phases: When price is moving sideways with decreasing volatility
Pre-Announcement Periods: Before earnings, economic data, or major events
Market Transitions: During shifts between trending and ranging markets
Low Volume Periods: When institutional participation is reduced
Strategic Applications:
Entry Timing: Wait for volatility compression before positioning for breakouts
Risk Management: Reduce position sizes during highlighted periods (anticipating volatility expansion)
Options Strategy: Sell premium during low volatility, buy during expansion
Multi-Timeframe Analysis: Combine with higher timeframe trends for confluence
Key Benefits
Objective Volatility Measurement: Removes subjectivity from identifying "quiet" markets
Adaptive Analysis: Automatically adjusts to current market conditions
Visual Clarity: Easy-to-interpret gradient highlighting
Customizable Sensitivity: Adjustable percentile thresholds for different trading styles
Best Used In Combination With:
Trend analysis tools
Support/resistance levels
Volume indicators
Momentum oscillators
This indicator is particularly valuable for traders who understand that periods of low volatility are often followed by periods of high volatility, allowing them to position ahead of potential significant price movements.
What It Does
This indicator identifies and highlights periods of extremely low market volatility by analyzing Bollinger Bands distance. It uses percentile-based analysis to find the "quietest" market periods and highlights them with a gradient background, operating on the premise that low volatility periods often precede significant price movements.
How It Works
Volatility Measurement: Calculates the distance between Bollinger Bands upper and lower boundaries
Percentile Analysis: Analyzes the lowest X% of volatility periods over a configurable lookback period (default: lowest 40% over 200 bars)
Visual Highlighting: Uses gradient opacity to show volatility levels - the lower the volatility, the more opaque the background highlighting
Adaptive Threshold: Automatically calculates what constitutes "low volatility" based on recent market conditions
Who Should Use It
Primary Users:
Breakout Traders: Looking for consolidation periods that may precede significant moves
Options Traders: Seeking low implied volatility periods before volatility expansion
Swing Traders: Identifying accumulation/distribution phases before trend continuation or reversal
Range Traders: Spotting tight trading ranges for mean reversion strategies
Trading Styles:
Volatility-based strategies
Breakout and momentum trading
Options strategies (volatility plays)
Market timing approaches
When to Use It
Market Conditions:
Consolidation Phases: When price is moving sideways with decreasing volatility
Pre-Announcement Periods: Before earnings, economic data, or major events
Market Transitions: During shifts between trending and ranging markets
Low Volume Periods: When institutional participation is reduced
Strategic Applications:
Entry Timing: Wait for volatility compression before positioning for breakouts
Risk Management: Reduce position sizes during highlighted periods (anticipating volatility expansion)
Options Strategy: Sell premium during low volatility, buy during expansion
Multi-Timeframe Analysis: Combine with higher timeframe trends for confluence
Key Benefits
Objective Volatility Measurement: Removes subjectivity from identifying "quiet" markets
Adaptive Analysis: Automatically adjusts to current market conditions
Visual Clarity: Easy-to-interpret gradient highlighting
Customizable Sensitivity: Adjustable percentile thresholds for different trading styles
Best Used In Combination With:
Trend analysis tools
Support/resistance levels
Volume indicators
Momentum oscillators
This indicator is particularly valuable for traders who understand that periods of low volatility are often followed by periods of high volatility, allowing them to position ahead of potential significant price movements.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.