ORB Range Indicator with a dynamic Consolidation Zone detectionThis script is a custom TradingView indicator written in Pine Script v6. It combines an Opening Range Breakout (ORB) strategy with a dynamic Consolidation Zone detection system. It is designed to help day traders identify key morning trading ranges, track volume momentum, and spot periods of market compression.
Opening Range Breakout (ORB)
* The indicator establishes a trading range based on a specific global session (New York, London, Tokyo, Frankfurt) and a custom duration (e.g., 5 to 45 minutes).
* It plots the highest and lowest price points of this time window.
* It calculates the specific trading volume that occurred strictly within the ORB time frame.
* It features Fibonacci extension targets plotted above and below the main range to act as profit taking levels.
Breakout and Momentum Tracking
* The script detects when the price crosses the ORB boundaries and marks these breakouts with visual shapes on the chart.
* It calculates the cumulative volume from the start of the session up to the exact moment of the breakout.
* A dynamic label tracks the maximum distance the price travels in the breakout direction, showing both point value and percentage.
Consolidation Zones
* The indicator identifies market compression by tracking local pivot highs and lows.
* If the price stays within a tight range for a minimum specified number of bars, it paints a visual consolidation zone on the chart.
* The boundaries of this zone update dynamically to include wicks, and the script generates alerts if the price breaks out of this compression area.
Technical Performance
* The code uses optimized variable tracking instead of heavy historical loops to ensure it runs smoothly on TradingView without freezing the chart. It also includes garbage collection for lines and labels to keep the visual interface clean.
Wskaźnik Pine Script®













