OPEN-SOURCE SCRIPT
Squeeze Vector [Gabremoku]

Squeeze Vector [Gabremoku] is a squeeze-based volatility breakout tool that combines Bollinger/Keltner compression detection, directional pressure flow, and a first-expansion state machine to help traders identify high-probability post-squeeze breakout setups.
The core idea is simple: compression precedes expansion. When Bollinger Bands shrink inside Keltner Channels, the market is coiling — and when that squeeze releases, the first directional signal can carry strong momentum. This script gives that process a structured visual and logical framework.
Core Concept — Squeeze → Release → Direction
A BB/KC squeeze occurs when Bollinger Bands, which reflect price volatility through standard deviation, contract inside Keltner Channels, which reflect typical range through ATR. This gap between the two envelopes is used as a proxy for volatility compression.
When BB width becomes smaller than KC width, the script identifies a Squeeze state. When it releases, the script enters an Armed state and opens a short post-squeeze window during which it looks for the first valid directional expansion.
Importantly, the squeeze release alone does not confirm direction. That is why the script adds multiple expansion confirmation filters before triggering a signal.
What it shows
Squeeze Vector Oscillator — a single line that rises as BB/KC compression increases. When it crosses above 50, the squeeze is active. The oscillator turns purple during squeeze states for fast visual identification.
Pressure Flow Histogram — a volume-weighted directional pressure value that reads where price closed within the candle range and weights it by volume relative to its moving average. Positive values indicate bullish pressure, negative values indicate bearish pressure.
Bollinger Overlay on Price — during squeeze states, the script renders Bollinger Bands directly on the main chart with gradient fills, making it easy to see where price is relative to the compressed structure.
LONG / SHORT signals — primary directional signals are placed on the main chart after a post-squeeze expansion bar meets all required conditions. Optional lighter repeat markers can be shown for follow-through confirmation.
Dashboard with live checklist — the on-chart dashboard shows the current state, regime, pressure, vector value, and a 6-point checklist for both long and short setups, with filled/empty circles to show how many conditions are currently met.
Signal Logic
The signal engine works as a state machine with three phases:
Squeeze — BB/KC compression is active. No signal is generated. The dashboard shows SQUEEZE.
Armed — the squeeze just released. The script opens a short expansion window and waits for directional confirmation. The dashboard shows ARMED.
Expansion signal — within the expansion window, if a valid directional bar forms with sufficient pressure, body size, and break condition, a LONG or SHORT label is placed on the main chart.
Signal direction is confirmed by checking:
Basis side: price above or below the BB basis
Pressure: smoothed directional pressure above threshold
Strong pressure: optional stronger filter
Body quality: minimum body-to-candle-range ratio
Break condition: higher high or lower low
Regime: optional EMA 200 trend filter
When both long and short conditions are simultaneously valid, the stronger pressure side wins. If pressure is equal, raw pressure bias decides.
States and Dashboard
The dashboard tracks the full machine at a glance:
Row Content
SQZ Squeeze ON / OFF
SEQ ARMED or READY
REG Trend regime (BULL / BEAR / OFF)
BIAS Current directional pressure bias
P Pressure Flow value
V Vector Oscillator value
Checklist 6-point LONG and SHORT condition matrix
The checklist can be set to appear only during Squeeze or Armed states to reduce visual noise when no setup is forming.
Features
✅ Bollinger/Keltner squeeze detection via ratio oscillator
✅ Volume-weighted directional pressure flow
✅ Post-squeeze first expansion state machine
✅ Armed → signal transition logic
✅ 6-point entry checklist for both long and short
✅ EMA 200 regime filter
✅ Bollinger overlay with gradient fill during squeeze
✅ LONG / SHORT signal labels on main chart
✅ Optional follow-through repeat markers
✅ Repeat window filter to suppress signal clustering
✅ Strategy mode: Long, Short, or Both
✅ Fully configurable dashboard with size and offset settings
✅ Alert conditions for BUY, SELL, and squeeze activation
How to use
A practical workflow:
Watch for the Vector Oscillator to cross above 50 and turn purple — that is the squeeze state.
When it releases below 50, the dashboard switches to ARMED.
In the expansion window, check the checklist: more filled circles on one side indicate stronger directional alignment.
A LONG or SHORT label confirms a valid first expansion signal.
Use the Pressure Flow histogram to gauge how strong and consistent the directional push is.
The squeeze release alone is not a signal. Direction is only confirmed when the expansion bar quality, pressure, and structure checks all align.
Notes
Like all squeeze-based tools, Squeeze Vector is most effective when used alongside price structure context. Squeezes release into strong moves, but not every release produces a sustained trend — volume, higher timeframe context, and support/resistance levels can all affect follow-through quality.
Author: Gabremoku
Pine Script v6
The core idea is simple: compression precedes expansion. When Bollinger Bands shrink inside Keltner Channels, the market is coiling — and when that squeeze releases, the first directional signal can carry strong momentum. This script gives that process a structured visual and logical framework.
Core Concept — Squeeze → Release → Direction
A BB/KC squeeze occurs when Bollinger Bands, which reflect price volatility through standard deviation, contract inside Keltner Channels, which reflect typical range through ATR. This gap between the two envelopes is used as a proxy for volatility compression.
When BB width becomes smaller than KC width, the script identifies a Squeeze state. When it releases, the script enters an Armed state and opens a short post-squeeze window during which it looks for the first valid directional expansion.
Importantly, the squeeze release alone does not confirm direction. That is why the script adds multiple expansion confirmation filters before triggering a signal.
What it shows
Squeeze Vector Oscillator — a single line that rises as BB/KC compression increases. When it crosses above 50, the squeeze is active. The oscillator turns purple during squeeze states for fast visual identification.
Pressure Flow Histogram — a volume-weighted directional pressure value that reads where price closed within the candle range and weights it by volume relative to its moving average. Positive values indicate bullish pressure, negative values indicate bearish pressure.
Bollinger Overlay on Price — during squeeze states, the script renders Bollinger Bands directly on the main chart with gradient fills, making it easy to see where price is relative to the compressed structure.
LONG / SHORT signals — primary directional signals are placed on the main chart after a post-squeeze expansion bar meets all required conditions. Optional lighter repeat markers can be shown for follow-through confirmation.
Dashboard with live checklist — the on-chart dashboard shows the current state, regime, pressure, vector value, and a 6-point checklist for both long and short setups, with filled/empty circles to show how many conditions are currently met.
Signal Logic
The signal engine works as a state machine with three phases:
Squeeze — BB/KC compression is active. No signal is generated. The dashboard shows SQUEEZE.
Armed — the squeeze just released. The script opens a short expansion window and waits for directional confirmation. The dashboard shows ARMED.
Expansion signal — within the expansion window, if a valid directional bar forms with sufficient pressure, body size, and break condition, a LONG or SHORT label is placed on the main chart.
Signal direction is confirmed by checking:
Basis side: price above or below the BB basis
Pressure: smoothed directional pressure above threshold
Strong pressure: optional stronger filter
Body quality: minimum body-to-candle-range ratio
Break condition: higher high or lower low
Regime: optional EMA 200 trend filter
When both long and short conditions are simultaneously valid, the stronger pressure side wins. If pressure is equal, raw pressure bias decides.
States and Dashboard
The dashboard tracks the full machine at a glance:
Row Content
SQZ Squeeze ON / OFF
SEQ ARMED or READY
REG Trend regime (BULL / BEAR / OFF)
BIAS Current directional pressure bias
P Pressure Flow value
V Vector Oscillator value
Checklist 6-point LONG and SHORT condition matrix
The checklist can be set to appear only during Squeeze or Armed states to reduce visual noise when no setup is forming.
Features
✅ Bollinger/Keltner squeeze detection via ratio oscillator
✅ Volume-weighted directional pressure flow
✅ Post-squeeze first expansion state machine
✅ Armed → signal transition logic
✅ 6-point entry checklist for both long and short
✅ EMA 200 regime filter
✅ Bollinger overlay with gradient fill during squeeze
✅ LONG / SHORT signal labels on main chart
✅ Optional follow-through repeat markers
✅ Repeat window filter to suppress signal clustering
✅ Strategy mode: Long, Short, or Both
✅ Fully configurable dashboard with size and offset settings
✅ Alert conditions for BUY, SELL, and squeeze activation
How to use
A practical workflow:
Watch for the Vector Oscillator to cross above 50 and turn purple — that is the squeeze state.
When it releases below 50, the dashboard switches to ARMED.
In the expansion window, check the checklist: more filled circles on one side indicate stronger directional alignment.
A LONG or SHORT label confirms a valid first expansion signal.
Use the Pressure Flow histogram to gauge how strong and consistent the directional push is.
The squeeze release alone is not a signal. Direction is only confirmed when the expansion bar quality, pressure, and structure checks all align.
Notes
Like all squeeze-based tools, Squeeze Vector is most effective when used alongside price structure context. Squeezes release into strong moves, but not every release produces a sustained trend — volume, higher timeframe context, and support/resistance levels can all affect follow-through quality.
Author: Gabremoku
Pine Script v6
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.