OPEN-SOURCE SCRIPT
업데이트됨 Volatility Squeeze Oscillator

Volatility Squeeze Oscillator
A volatility-regime tool that answers two questions in one pane: is the market coiled (a squeeze — volatility compressed and likely to expand), and when it releases, which way does it go? It measures compression as how low current volatility sits versus its own recent range, reads the release direction from where price sits in the band, and forward-calibrates whether squeeze releases actually pay on the chart you're viewing.
Why these parts are combined (not a mashup for show). A squeeze without a direction is half a tool; a direction without a squeeze is just momentum. Compression uses an exponentially-weighted volatility estimate (more weight on recent moves, so it reacts faster than a simple average) ranked against its own recent history — when it sits in the low percentile, volatility is unusually compressed. A relative test like this stays genuinely intermittent on any instrument; an absolute band-vs-band test drifts to "always on" or "never on" depending on the symbol. Release direction comes from a smoothed read of where price sits within an EWMA band. And forward calibration measures whether releases in each direction actually followed through on this symbol.
How it works. An EWMA volatility estimate is ranked against its own recent history; Squeeze ON = that rank is in the low percentile. The histogram is a smoothed read of where price sits inside an EWMA band (its sign = likely release direction). A signal fires when a squeeze releases in the histogram's direction. Each signal is labelled by a triple barrier — a profit target and equal stop in ATR units plus a time limit — split into in-sample and recent out-of-sample, with a confidence interval and a multiple-testing check.
How to use. Read the Verdict (Squeeze ON / Long release / Short release / Wait) and the Conviction, which reads "High" only when releases in that direction survive the test here — otherwise it openly says so. Histogram above zero = upward pressure inside the band; gold dots on the zero line mark squeeze-ON bars. Non-repainting. Best used with your own entry and risk plan, not alone.
Disclaimer: for research and education only. Not financial advice. Trading carries risk of loss; manage your own positions.
A volatility-regime tool that answers two questions in one pane: is the market coiled (a squeeze — volatility compressed and likely to expand), and when it releases, which way does it go? It measures compression as how low current volatility sits versus its own recent range, reads the release direction from where price sits in the band, and forward-calibrates whether squeeze releases actually pay on the chart you're viewing.
Why these parts are combined (not a mashup for show). A squeeze without a direction is half a tool; a direction without a squeeze is just momentum. Compression uses an exponentially-weighted volatility estimate (more weight on recent moves, so it reacts faster than a simple average) ranked against its own recent history — when it sits in the low percentile, volatility is unusually compressed. A relative test like this stays genuinely intermittent on any instrument; an absolute band-vs-band test drifts to "always on" or "never on" depending on the symbol. Release direction comes from a smoothed read of where price sits within an EWMA band. And forward calibration measures whether releases in each direction actually followed through on this symbol.
How it works. An EWMA volatility estimate is ranked against its own recent history; Squeeze ON = that rank is in the low percentile. The histogram is a smoothed read of where price sits inside an EWMA band (its sign = likely release direction). A signal fires when a squeeze releases in the histogram's direction. Each signal is labelled by a triple barrier — a profit target and equal stop in ATR units plus a time limit — split into in-sample and recent out-of-sample, with a confidence interval and a multiple-testing check.
How to use. Read the Verdict (Squeeze ON / Long release / Short release / Wait) and the Conviction, which reads "High" only when releases in that direction survive the test here — otherwise it openly says so. Histogram above zero = upward pressure inside the band; gold dots on the zero line mark squeeze-ON bars. Non-repainting. Best used with your own entry and risk plan, not alone.
Disclaimer: for research and education only. Not financial advice. Trading carries risk of loss; manage your own positions.
릴리즈 노트
Minor Update릴리즈 노트
v1.1 — Calibration accuracy, performance, and a coil-duration readMore accurate short-side edge. The down-side base rate was previously approximated as 100 − up%. Because an ATR target and stop can both be touched on the same bar, that complement counted ties as "down" and understated the short edge. Down-outcomes are now counted independently from the same triple barrier, so the up and down edges are measured on identical terms. (Up% and Dn% may now sum to slightly under 100 — the small gap is the genuine tie fraction.)
Lighter and faster. The buy/sell branches were recomputing the exact triple barrier the base rate had already computed (same entry and ATR). They now reuse that single result, removing redundant work on every signal bar.
New: squeeze age + depth. The State row now shows how long the coil has held and how compressed it is (e.g. coiled 14b · p8) — a longer, deeper coil is the more notable setup. Also added as a SqueezeAge Data-Window export.
No changes to signals, inputs, or defaults; behaviour is otherwise identical.
릴리즈 노트
v1.1 — Finishing pass (no engine change)- Added a Data Window (EXP_) export bus so the squeeze state, release direction and edge can feed
other scripts via input.source().
- Added a cost model: a new "Round-trip cost (R)" input and a Net R row. Conviction now requires a
squeeze release to BOTH beat its base rate (Wilson) AND survive costs — a gross edge that costs
eat through is not tradeable, and the panel now says so.
- Added the MPL-2.0 licence header.
- No change to the squeeze detection, release-direction logic or forward calibration — everyday
behaviour is identical.
Descriptive research tooling, in-sample statistics, not investment advice.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.