OPEN-SOURCE SCRIPT
Volatility Squeeze & Momentum

This indicator flags low-volatility "squeeze" phases and pairs them with a momentum histogram, so that volatility expansions can be read together with direction. The squeeze concept was popularized by John Carter (TTM Squeeze); this script is an original open-source implementation of that public idea.
How it works
A squeeze is on when both Bollinger Bands (default 20, 2.0) sit inside the Keltner Channels (default 20, 1.5 x average true range) — a sign that recent volatility is unusually compressed. The zero line shows the state: orange dots while the squeeze is on, gray otherwise. Momentum is a linear-regression estimate of price relative to a midline (average of the Donchian midpoint and the SMA), shown as a four-color histogram: rising/falling shades above and below zero.
Three alert conditions are included: squeeze release, release with positive momentum, and release with negative momentum.
Notes and limitations
A squeeze marks compression, not direction — releases can resolve either way, and momentum at the moment of release is context, not a guarantee. All parameters are configurable; defaults follow common usage.
How it works
A squeeze is on when both Bollinger Bands (default 20, 2.0) sit inside the Keltner Channels (default 20, 1.5 x average true range) — a sign that recent volatility is unusually compressed. The zero line shows the state: orange dots while the squeeze is on, gray otherwise. Momentum is a linear-regression estimate of price relative to a midline (average of the Donchian midpoint and the SMA), shown as a four-color histogram: rising/falling shades above and below zero.
Three alert conditions are included: squeeze release, release with positive momentum, and release with negative momentum.
Notes and limitations
A squeeze marks compression, not direction — releases can resolve either way, and momentum at the moment of release is context, not a guarantee. All parameters are configurable; defaults follow common usage.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。