OPEN-SOURCE SCRIPT
Squeeze Momentum MACD

Squeeze Momentum MACD
🧠 Description
Squeeze Momentum MACD combines the concept of market volatility compression (the “squeeze”) from Bollinger Bands (BB) and Keltner Channels (KC) with a MACD-style momentum oscillator to reveal potential breakout phases.
The indicator first calculates:
BB Width = Upper Band − Lower Band
KC Width = Upper Band − Lower Band
Then it computes their difference:
Δ = BB Width − KC Width
When Δ > 0 → BB width is greater than KC width → volatility is expanding → potential momentum breakout.
When Δ < 0 → BB is inside KC → volatility is compressing → potential squeeze phase before expansion.
This Δ value is then processed through a MACD-style calculation:
MACD Line = EMA(fast) − EMA(slow)
Signal Line = EMA(MACD, signal length)
Histogram = MACD − Signal
The result is a visual momentum oscillator that behaves like MACD but measures volatility expansion instead of price direction.
🔹 Features:
Dynamic 4-color MACD & Signal lines (positive/negative + rising/falling)
Optional display of raw BB & KC widths
Fully adjustable parameters for BB, KC, and MACD
Works on all timeframes and instruments
🔹 Ideal For:
Detecting market squeezes and breakout momentum
Timing entries before volatility expansion
Integrating volatility and momentum into a single framework
🧠 Description
Squeeze Momentum MACD combines the concept of market volatility compression (the “squeeze”) from Bollinger Bands (BB) and Keltner Channels (KC) with a MACD-style momentum oscillator to reveal potential breakout phases.
The indicator first calculates:
BB Width = Upper Band − Lower Band
KC Width = Upper Band − Lower Band
Then it computes their difference:
Δ = BB Width − KC Width
When Δ > 0 → BB width is greater than KC width → volatility is expanding → potential momentum breakout.
When Δ < 0 → BB is inside KC → volatility is compressing → potential squeeze phase before expansion.
This Δ value is then processed through a MACD-style calculation:
MACD Line = EMA(fast) − EMA(slow)
Signal Line = EMA(MACD, signal length)
Histogram = MACD − Signal
The result is a visual momentum oscillator that behaves like MACD but measures volatility expansion instead of price direction.
🔹 Features:
Dynamic 4-color MACD & Signal lines (positive/negative + rising/falling)
Optional display of raw BB & KC widths
Fully adjustable parameters for BB, KC, and MACD
Works on all timeframes and instruments
🔹 Ideal For:
Detecting market squeezes and breakout momentum
Timing entries before volatility expansion
Integrating volatility and momentum into a single framework
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
HK-Uk Hoiliday Trader, Short-term programme trade, Forex-Commodities-Crypto, 2005-2023
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
HK-Uk Hoiliday Trader, Short-term programme trade, Forex-Commodities-Crypto, 2005-2023
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。