OPEN-SOURCE SCRIPT
TTM Squeeze v5.1 [JopAlgo]

TTM Squeeze v5.1 [JopAlgo] — compression → expansion, with a directional read
Core idea
This blends Bollinger Bands and Keltner Channels to detect volatility compression (a “squeeze”), then uses a momentum histogram to suggest which way the release may travel.
Squeeze On → BB is inside KC → quiet, pressure building
Squeeze Off → BB exits KC → expansion likely starting
Momentum histogram → direction and pace of the expansion
Read it as: compression → expansion and let momentum tell you up or down.
What you’ll see
Momentum histogram (centered at 0):
Above 0 → bullish tilt
Below 0 → bearish tilt
Rising vs falling bars → acceleration vs deceleration
Zero-line dots colored by squeeze state:
Red at 0 → Squeeze On (BB inside KC)
Green at 0 → Squeeze Off (no compression)
Quick scan → Is the dot red or green? Is the histogram above or below 0? Are the bars growing or shrinking?
How to use it (simple playbook)
1) Detect the setup
Dot turns red → Squeeze On → build your plan at key levels (no trade by itself).
While red, map entry levels and invalidations using your price tools.
2) Trade the release
First green after a red run → Squeeze Off → look for entry with momentum direction:
Histogram above 0 and rising → long bias
Histogram below 0 and falling → short bias
3) Location first (always)
Execute at objective references:
Volume Profile v3.2 [JopAlgo] → VAH / VAL / POC / LVNs
Anchored VWAP [JopAlgo] → session / weekly / event anchors
No level → no trade. A squeeze release into a level is better than one mid-range.
4) Confirmation stack (optional but strong)
If you also use CVDv1 [JopAlgo] → prefer Alignment OK and avoid entries where Absorption is against your side.
Entries, exits, risk
Break + retest (trend release)
Condition → Dot flips green, histogram crosses/expands on the same side of 0, price breaks a mapped level.
Entry → On the first retest/hold of that level after the flip.
Stop → Beyond the level or last swing.
Targets → Next VP node (POC/HVNs) → then trail.
Range edge release (rotation to value)
Condition → Dot flips green at a range boundary (e.g., VAL/VAH), histogram aligns with the break.
Entry → On reclaim/reject confirmation at that boundary.
Invalidation → Quick loss of the boundary and histogram roll against you.
Stand down
Dot green but histogram flat near 0 → noisy release, skip or size down.
Green release into a major opposite level with shrinking bars → take partials early.
Settings that matter (and how to tune)
BB/KC Length (default 21) → the lookback for both envelopes.
Shorter → faster squeezes, more signals. Longer → fewer, larger moves.
BB Multiplier (default 1.0 here)
Higher (e.g., 2.0) → fewer, cleaner squeezes (classic TTM style).
Lower (e.g., 1.0–1.5) → more frequent “tight” squeezes.
KC Multiplier (default 1.5)
Higher → wider KC → easier for BB to sit inside → more squeeze-on periods.
Lower → fewer squeeze-on periods.
Momentum Length (default 20) for the histogram (linreg on close − KC mid):
Shorter → earlier but noisier direction reads.
Longer → steadier but slower.
Practical combos
Classic feel → BB 2.0, KC 1.5, Length 20–21, Momentum 20
Intraday fast → BB 1.5, KC 1.5, Length 14–20, Momentum 14–18
Swing calm → BB 2.0, KC 1.5–1.8, Length 21–34, Momentum 20–30
Pattern cheat sheet
Red cluster → Green + histogram expansion above 0 → upside release → buy the retest of the breakout level → trail.
Red cluster → Green + histogram expansion below 0 → downside release → sell the retest → trail.
Green but histogram crosses back toward 0 quickly → failed release → avoid or scratch.
Multiple red↔green flips near 0 → volatility churn → wait for a clear level break with follow-through.
Best combos (kept simple)
Volume Profile v3.2 [JopAlgo] → Plan the squeeze while red; trigger on green at VAH/VAL/LVN/POC.
Anchored VWAP [JopAlgo] → A release that reclaims/rejects an AVWAP with histogram expansion is higher quality.
CVDv1 [JopAlgo] (optional) → Prefer releases with taker flow; skip if Absorption fights your side.
Common mistakes this helps you avoid
Entering during the red squeeze with no price trigger.
Chasing a green flip mid-range, far from levels.
Ignoring direction when the histogram is below 0 for longs (or above 0 for shorts).
Holding when the histogram shrinks back toward 0 into your target—take profits.
Disclaimer
This indicator and write-up are for education only, not financial advice. Trading carries risk; results vary by market, venue, and settings. Test first, act at defined levels, and manage risk. No guarantees or warranties are provided.
Core idea
This blends Bollinger Bands and Keltner Channels to detect volatility compression (a “squeeze”), then uses a momentum histogram to suggest which way the release may travel.
Squeeze On → BB is inside KC → quiet, pressure building
Squeeze Off → BB exits KC → expansion likely starting
Momentum histogram → direction and pace of the expansion
Read it as: compression → expansion and let momentum tell you up or down.
What you’ll see
Momentum histogram (centered at 0):
Above 0 → bullish tilt
Below 0 → bearish tilt
Rising vs falling bars → acceleration vs deceleration
Zero-line dots colored by squeeze state:
Red at 0 → Squeeze On (BB inside KC)
Green at 0 → Squeeze Off (no compression)
Quick scan → Is the dot red or green? Is the histogram above or below 0? Are the bars growing or shrinking?
How to use it (simple playbook)
1) Detect the setup
Dot turns red → Squeeze On → build your plan at key levels (no trade by itself).
While red, map entry levels and invalidations using your price tools.
2) Trade the release
First green after a red run → Squeeze Off → look for entry with momentum direction:
Histogram above 0 and rising → long bias
Histogram below 0 and falling → short bias
3) Location first (always)
Execute at objective references:
Volume Profile v3.2 [JopAlgo] → VAH / VAL / POC / LVNs
Anchored VWAP [JopAlgo] → session / weekly / event anchors
No level → no trade. A squeeze release into a level is better than one mid-range.
4) Confirmation stack (optional but strong)
If you also use CVDv1 [JopAlgo] → prefer Alignment OK and avoid entries where Absorption is against your side.
Entries, exits, risk
Break + retest (trend release)
Condition → Dot flips green, histogram crosses/expands on the same side of 0, price breaks a mapped level.
Entry → On the first retest/hold of that level after the flip.
Stop → Beyond the level or last swing.
Targets → Next VP node (POC/HVNs) → then trail.
Range edge release (rotation to value)
Condition → Dot flips green at a range boundary (e.g., VAL/VAH), histogram aligns with the break.
Entry → On reclaim/reject confirmation at that boundary.
Invalidation → Quick loss of the boundary and histogram roll against you.
Stand down
Dot green but histogram flat near 0 → noisy release, skip or size down.
Green release into a major opposite level with shrinking bars → take partials early.
Settings that matter (and how to tune)
BB/KC Length (default 21) → the lookback for both envelopes.
Shorter → faster squeezes, more signals. Longer → fewer, larger moves.
BB Multiplier (default 1.0 here)
Higher (e.g., 2.0) → fewer, cleaner squeezes (classic TTM style).
Lower (e.g., 1.0–1.5) → more frequent “tight” squeezes.
KC Multiplier (default 1.5)
Higher → wider KC → easier for BB to sit inside → more squeeze-on periods.
Lower → fewer squeeze-on periods.
Momentum Length (default 20) for the histogram (linreg on close − KC mid):
Shorter → earlier but noisier direction reads.
Longer → steadier but slower.
Practical combos
Classic feel → BB 2.0, KC 1.5, Length 20–21, Momentum 20
Intraday fast → BB 1.5, KC 1.5, Length 14–20, Momentum 14–18
Swing calm → BB 2.0, KC 1.5–1.8, Length 21–34, Momentum 20–30
Pattern cheat sheet
Red cluster → Green + histogram expansion above 0 → upside release → buy the retest of the breakout level → trail.
Red cluster → Green + histogram expansion below 0 → downside release → sell the retest → trail.
Green but histogram crosses back toward 0 quickly → failed release → avoid or scratch.
Multiple red↔green flips near 0 → volatility churn → wait for a clear level break with follow-through.
Best combos (kept simple)
Volume Profile v3.2 [JopAlgo] → Plan the squeeze while red; trigger on green at VAH/VAL/LVN/POC.
Anchored VWAP [JopAlgo] → A release that reclaims/rejects an AVWAP with histogram expansion is higher quality.
CVDv1 [JopAlgo] (optional) → Prefer releases with taker flow; skip if Absorption fights your side.
Common mistakes this helps you avoid
Entering during the red squeeze with no price trigger.
Chasing a green flip mid-range, far from levels.
Ignoring direction when the histogram is below 0 for longs (or above 0 for shorts).
Holding when the histogram shrinks back toward 0 into your target—take profits.
Disclaimer
This indicator and write-up are for education only, not financial advice. Trading carries risk; results vary by market, venue, and settings. Test first, act at defined levels, and manage risk. No guarantees or warranties are provided.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。