OPEN-SOURCE SCRIPT
Squeeze Box

About This Script
The Squeeze Box indicator is designed to detect periods of price compression where volatility contracts and price begins to coil into a tight range. These areas often precede expansion moves, breakouts, trend continuation, or volatility events.
Unlike traditional squeeze indicators that rely mainly on Bollinger Bands or Keltner Channels, this script focuses directly on the structure of consolidation itself.
The indicator automatically identifies tight trading ranges and draws visual “squeeze boxes” around them, helping traders spot:
The script includes two optional squeeze-detection engines:
These methods can be used individually or together to filter for higher-quality setups.
Features
Automatic squeeze box detection
Dynamic box extension while compression remains active
Optional midline display
Adjustable sensitivity settings
ATR-based compression filtering
Regression-based “tightness” filtering
Customizable colors and transparency
Control over how many historical boxes remain visible
Optional seed markers for early squeeze detection
Best Uses
This indicator works especially well for:
General Interpretation
Tight, narrow boxes often represent decreasing volatility and reduced selling pressure.
A breakout above the box may signal renewed momentum or institutional accumulation.
Failure to break out or rejection from the upper boundary may indicate unresolved supply.
The script is intended as a structure and pressure visualization tool rather than a standalone buy/sell system.
Suggested Settings
ATR Multiplier: ~0.6 to 1.2
Regression Multiplier: ~0.20 to 0.50
Minimum Bars in Box: 3+
Lower values create more selective squeezes, while higher values identify broader consolidation zones.
Seed Dots
Optional dots beneath price indicate early compression conditions before a full squeeze box is confirmed. These dots act as an early warning that volatility and price movement are beginning to tighten.
In many cases:
Seed Dot → Squeeze Box → Expansion
They are intended to help traders monitor developing consolidation structures and potential breakout setups.
Philosophy Behind the Indicator
Markets often move from:
Expansion → Contraction → Expansion
This script focuses on the contraction phase — the “quiet zone” where pressure builds before movement expands again.
The goal is not simply to find volatility squeezes, but to locate areas where price becomes compressed, orderly, and structurally tight before a potential directional move.
The Squeeze Box indicator is designed to detect periods of price compression where volatility contracts and price begins to coil into a tight range. These areas often precede expansion moves, breakouts, trend continuation, or volatility events.
Unlike traditional squeeze indicators that rely mainly on Bollinger Bands or Keltner Channels, this script focuses directly on the structure of consolidation itself.
The indicator automatically identifies tight trading ranges and draws visual “squeeze boxes” around them, helping traders spot:
- Volatility contraction
- Quiet accumulation/distribution
- VCP-style tightening
- Darvas-like consolidation zones
- Pre-breakout pressure buildup
- Pause-and-go continuation patterns
The script includes two optional squeeze-detection engines:
- ATR Range Compression
- Measures whether the total height of the consolidation zone is small relative to ATR.
- Regression Residual Compression
- Measures how tightly price hugs its regression line, helping identify orderly compression rather than random chop.
These methods can be used individually or together to filter for higher-quality setups.
Features
Automatic squeeze box detection
Dynamic box extension while compression remains active
Optional midline display
Adjustable sensitivity settings
ATR-based compression filtering
Regression-based “tightness” filtering
Customizable colors and transparency
Control over how many historical boxes remain visible
Optional seed markers for early squeeze detection
Best Uses
This indicator works especially well for:
Momentum continuation setups- VCP (Volatility Contraction Pattern) style trading
- Breakout traders
- Episodic Pivot follow-through
- Swing trading
- Identifying low-risk consolidation areas before expansion
General Interpretation
Tight, narrow boxes often represent decreasing volatility and reduced selling pressure.
A breakout above the box may signal renewed momentum or institutional accumulation.
Failure to break out or rejection from the upper boundary may indicate unresolved supply.
The script is intended as a structure and pressure visualization tool rather than a standalone buy/sell system.
Suggested Settings
ATR Multiplier: ~0.6 to 1.2
Regression Multiplier: ~0.20 to 0.50
Minimum Bars in Box: 3+
Lower values create more selective squeezes, while higher values identify broader consolidation zones.
Seed Dots
Optional dots beneath price indicate early compression conditions before a full squeeze box is confirmed. These dots act as an early warning that volatility and price movement are beginning to tighten.
In many cases:
Seed Dot → Squeeze Box → Expansion
They are intended to help traders monitor developing consolidation structures and potential breakout setups.
Philosophy Behind the Indicator
Markets often move from:
Expansion → Contraction → Expansion
This script focuses on the contraction phase — the “quiet zone” where pressure builds before movement expands again.
The goal is not simply to find volatility squeezes, but to locate areas where price becomes compressed, orderly, and structurally tight before a potential directional move.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.