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
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.