OPEN-SOURCE SCRIPT
Range Breakout by AV

Range Compression Breakout
Volatility compression and expansion system
Range Compression Breakout automatically detects periods of low-volatility consolidation, draws and maintains the range in real time, and signals when price transitions into expansion.
How it works
Compression is measured relative to the market's own recent behavior rather than a fixed price distance. In Adaptive Percentile mode, a range qualifies when its high-low span sits among the quietest percentile of its recent history — so the same settings work across futures, FX, crypto, and equities without retuning. ATR Multiple mode is also available for a fixed volatility-based threshold.
Once a range is detected, the box is dynamic. While price stays contained, the box expands to absorb new highs and lows, capturing the full churn of the consolidation instead of resetting on every probe.
Signals
Break — price closes decisively beyond the boundary plus a buffer, with optional multi-bar confirmation and an optional volume-spike filter.
Wick Long / Wick Short — a failed probe outside the range that closes back inside on a long wick, confirmed by the following bar, indicating mean reversion toward the midline.
A cooldown period after each break prevents the box from immediately reforming on the expansion move.
Settings
Four preset profiles — Tight Ranges for low-timeframe scalping, Normal Ranges for intraday, Swing Trading for multi-day consolidations, and Options Selling for extended sideways chop — each configuring lookback, tightness, minimum bars, confirmation, and cooldown. Custom mode exposes all parameters. Box fill, borders, midline, and signal colors are fully adjustable, and each signal type toggles independently.
Alerts
Range Detected, Range Breakout, Breakout with Volume Confirmation, and Range Reversal.
Notes
Volume confirmation should be left off on spot FX and other symbols reporting tick-based volume. Diagnostic values including the range-to-ATR ratio and compression state are available in the Data Window for calibration.
Volatility compression and expansion system
Range Compression Breakout automatically detects periods of low-volatility consolidation, draws and maintains the range in real time, and signals when price transitions into expansion.
How it works
Compression is measured relative to the market's own recent behavior rather than a fixed price distance. In Adaptive Percentile mode, a range qualifies when its high-low span sits among the quietest percentile of its recent history — so the same settings work across futures, FX, crypto, and equities without retuning. ATR Multiple mode is also available for a fixed volatility-based threshold.
Once a range is detected, the box is dynamic. While price stays contained, the box expands to absorb new highs and lows, capturing the full churn of the consolidation instead of resetting on every probe.
Signals
Break — price closes decisively beyond the boundary plus a buffer, with optional multi-bar confirmation and an optional volume-spike filter.
Wick Long / Wick Short — a failed probe outside the range that closes back inside on a long wick, confirmed by the following bar, indicating mean reversion toward the midline.
A cooldown period after each break prevents the box from immediately reforming on the expansion move.
Settings
Four preset profiles — Tight Ranges for low-timeframe scalping, Normal Ranges for intraday, Swing Trading for multi-day consolidations, and Options Selling for extended sideways chop — each configuring lookback, tightness, minimum bars, confirmation, and cooldown. Custom mode exposes all parameters. Box fill, borders, midline, and signal colors are fully adjustable, and each signal type toggles independently.
Alerts
Range Detected, Range Breakout, Breakout with Volume Confirmation, and Range Reversal.
Notes
Volume confirmation should be left off on spot FX and other symbols reporting tick-based volume. Diagnostic values including the range-to-ATR ratio and compression state are available in the Data Window for calibration.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.