OPEN-SOURCE SCRIPT

Squeeze Impulse Oscillator

546
Squeeze Impulse Oscillator (SIO)
Indicator Description
The Squeeze Impulse Oscillator is designed to detect moments when the market exits a consolidation phase (squeeze) and forms a strong impulsive move. The indicator analyzes candlestick patterns, the ratio of the body to the range, wick lengths, and price dynamics to assess the strength of the current trend and potential breakout from consolidation.

The core idea is to compare two components:

Impulse – shows how strong the price movement is, based on the body size relative to the range and the persistence of direction (consecutive bars in the same direction).

Squeeze – reflects the degree of market tightness, evaluated by wick length and range contraction. Longer wicks and narrower ranges indicate higher energy accumulation for a subsequent impulse.

The resulting SIO value = impulse − squeeze. Positive values indicate a dominance of the impulse component, negative values point to a squeeze phase. Additional threshold levels help identify confident impulse zones and extreme squeeze zones.

How It Works
Candle Evaluation

Relative body size (bodyEff) – ratio of the candle body to its full range. Larger body means stronger impulse.

Wick ratio (wickRatio) – total wick length relative to the range. Long wicks indicate indecision or accumulation.

Current range compared to its average (rangeRatio) – helps incorporate volatility.

Price Dynamics

Persistence factor (persist) equals 1 if the last two price changes are in the same direction, otherwise 0.

Component Calculation

impulseScore = bodyEff × rangeRatio × (0.5 + 0.5 × persist)

squeezeScore = wickRatio × (2.0 − rangeRatio) × (1.0 − persist × 0.5)

Oscillator

rawSIO = impulseScore − squeezeScore

Final sio value is smoothed with an exponential moving average (EMA) using the specified smoothing period.

Squeeze Counter

When sio drops below the squeeze threshold (i_sqzTh), a consecutive bar count begins. The counter resets when sio rises above zero.

Additional Line

Averaged wick bias (avgWickBias) is displayed, showing which side has longer wicks (positive → bullish bias, negative → bearish bias). Used for signal filtering.

Signals
The indicator generates three types of signals (enabled via Show Signals parameter):

Bull Impulse – green triangle at the bottom.
Conditions:

sio crosses above the impulse threshold (i_impTh);

preceded by at least the minimum number of squeeze bars (Min Squeeze Bars);

wick bias positive (avgWickBias > 0).
Interpretation: after a prolonged squeeze phase, price starts moving up, confirmed by bullish candle structure.

Bear Impulse – red triangle at the bottom.
Same conditions but wick bias ≤ 0.
Interpretation: expected downward move after a squeeze.

Squeeze Start – purple diamond at the top.
Occurs when sio crosses below the squeeze threshold. Warns of possible energy accumulation and an upcoming impulse.

Visual Elements
SIO Histogram – colored according to the state:

bright green/red (depending on candle direction) – above impulse threshold;

purple – below squeeze threshold;

gray – neutral zone.

Wick Bias Line (yellow) – scaled for better visibility.

Squeeze Counter – purple step line showing consecutive bars in squeeze.

Background Highlight – squeeze zones are marked with a semi‑transparent purple background.

Horizontal Levels: impulse threshold, zero line, squeeze threshold.

Input Parameters
Core

Period – period for average range calculation and wick bias moving average.

Smoothing – EMA smoothing of the final SIO value.

Impulse Threshold – level above which the value is considered impulsive.

Squeeze Threshold – level below which the value is considered a squeeze.

Signals

Show Signals – enable/disable signal plotting.

Min Squeeze Bars – minimum number of consecutive squeeze bars required for an impulse signal.

Highlight Squeeze Zones – enable/disable background highlighting.

Colors – custom colors for all visual elements.

Usage
The indicator helps identify entry points after consolidation phases. Buy/sell signals should be considered only with confirming factors: higher‑timeframe trend, volume, support/resistance levels. False signals may occur in low‑volatility markets or during news events. It is recommended to backtest and adapt thresholds for the specific instrument.

Disclaimer
This indicator is not financial advice. All calculations are based on historical data and do not guarantee future results. Use it as one of many analytical tools in combination with other methods.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.