Compression Box Break and Retest Intraday @darshaksscOverview
Compression Box Break + Retest is a clean, single-concept price-action indicator designed to detect range compression followed by structured breakouts.
The script identifies periods of reduced volatility (tight price ranges), draws a visual compression box, and highlights breakout and optional retest events when price expands beyond the defined range.
This tool focuses exclusively on price behavior — no moving averages, oscillators, volume indicators, or external calculations are used.
How It Works
1️⃣ Compression Detection
The script measures price range over a configurable lookback window.
When volatility contracts below a defined threshold for a minimum number of bars, a compression box is locked.
2️⃣ Breakout Confirmation
A breakout is triggered when price moves beyond the box boundary with optional:
Close-based confirmation (default)
Wick-based confirmation
Breakout buffer (percentage of box height)
Strong candle filter (body-to-range ratio)
Optional 1-bar follow-through confirmation
These filters help reduce low-quality expansion signals while keeping the logic strictly price-based.
3️⃣ Retest Detection (Optional)
After a breakout, the script can detect pullbacks to the former box boundary within a defined window.
This allows traders to monitor continuation structures after expansion.
Key Features
• Clean compression box visualization
• Breakout and retest markers
• Configurable breakout strength filters
• Optional follow-through confirmation
• Movable dashboard (9 positions)
• Lightweight and efficient
• Intraday-optimized logic
Best Use Case
This script is designed primarily for intraday environments where volatility cycles between compression and expansion phases.
It can be used to monitor:
• Range breakouts
• Momentum expansions
• Structure continuation
• Consolidation break patterns
Timeframes such as 1m–5m may show more frequent setups depending on market conditions.
Notes
• This indicator does not repaint confirmed signals.
• All calculations are based on completed bar data.
• No future-bar references are used.
• This script does not provide financial advice.
Always combine tools with proper risk management and market context.
Pine Script® göstergesi






















