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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。