PROTECTED SOURCE SCRIPT
zavaUnni-Consolidation Zone Detector

Consolidation Zone Detector - Explanation
This Pine Script indicator is designed to detect Consolidation (flat/sideways) zones in price movement by analyzing volatility and identifying periods of consolidation. It visually highlights these flat zones, helping traders spot potential breakout opportunities.
🔹 Key Features
Customizable Timeframe Selection
Users can choose a specific timeframe (TF) for analysis.
Option to use Heikin Ashi candles instead of standard candlesticks for smoother trend detection.
Volatility-Based Analysis
Calculates body size (co_rate) and high-low range (hl_rate) to measure price movement.
If volatility is below a predefined threshold, the zone is classified as flat.
Flat Zone Detection & Visualization
Detects periods of low volatility and marks them as flat zones.
Stores the highest (flat_high) and lowest (flat_low) prices during the flat period.
If volatility increases beyond the threshold, the flat status is deactivated.
Visual Representation with Lines & Shaded Areas
When a flat zone is detected, it is highlighted with orange lines at the high and low levels.
These lines extend dynamically as the flat zone continues.
A semi-transparent shaded area is drawn to emphasize the consolidation range.
🔹 How to Use
Identify sideways price movements and prepare for potential breakouts.
Use in conjunction with other indicators to refine entry and exit points.
Combine with Heikin Ashi candles for a smoother trend analysis.
This indicator is particularly useful for spotting range-bound markets and detecting areas of low volatility where a breakout may soon occur
This Pine Script indicator is designed to detect Consolidation (flat/sideways) zones in price movement by analyzing volatility and identifying periods of consolidation. It visually highlights these flat zones, helping traders spot potential breakout opportunities.
🔹 Key Features
Customizable Timeframe Selection
Users can choose a specific timeframe (TF) for analysis.
Option to use Heikin Ashi candles instead of standard candlesticks for smoother trend detection.
Volatility-Based Analysis
Calculates body size (co_rate) and high-low range (hl_rate) to measure price movement.
If volatility is below a predefined threshold, the zone is classified as flat.
Flat Zone Detection & Visualization
Detects periods of low volatility and marks them as flat zones.
Stores the highest (flat_high) and lowest (flat_low) prices during the flat period.
If volatility increases beyond the threshold, the flat status is deactivated.
Visual Representation with Lines & Shaded Areas
When a flat zone is detected, it is highlighted with orange lines at the high and low levels.
These lines extend dynamically as the flat zone continues.
A semi-transparent shaded area is drawn to emphasize the consolidation range.
🔹 How to Use
Identify sideways price movements and prepare for potential breakouts.
Use in conjunction with other indicators to refine entry and exit points.
Combine with Heikin Ashi candles for a smoother trend analysis.
This indicator is particularly useful for spotting range-bound markets and detecting areas of low volatility where a breakout may soon occur
Script protegido
Esse script é publicada como código fechado. No entanto, você pode gerenciar suas escolhas de bate-papo. Por favor, abra suas Configurações do perfil
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script protegido
Esse script é publicada como código fechado. No entanto, você pode gerenciar suas escolhas de bate-papo. Por favor, abra suas Configurações do perfil
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.