PROTECTED SOURCE SCRIPT

zavaUnni-Consolidation Zone Detector

180
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

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.