OPEN-SOURCE SCRIPT
KC-BB Squeeze Trend Trader

█ OVERVIEW
The KC-BB Squeeze Trend Trader identifies volatility compression and expansion by detecting when Bollinger Bands contract inside Keltner Channels and then release with confirmed momentum. It highlights potential trend-starting breakouts by combining squeeze detection, directional momentum, trend bias, and optional volume filters.
During periods of low volatility, price consolidates and energy builds. When volatility expands again, strong directional moves often follow. This tool helps traders spot those opportunities early with clear visual cues and optional performance tracking.
█ KEY FEATURES
█ HOW IT WORKS
█ HOW TO USE
█ TIMEFRAME GUIDANCE
█ SETTINGS SUMMARY
█ ALERTS
█ NOTES
█ CREDITS
Inspired by the Bollinger Band and Keltner Channel squeeze concept popularized by John Carter’s TTM Squeeze, with added enhancements for squeeze strength, filtering, and real-time performance metrics.
The KC-BB Squeeze Trend Trader identifies volatility compression and expansion by detecting when Bollinger Bands contract inside Keltner Channels and then release with confirmed momentum. It highlights potential trend-starting breakouts by combining squeeze detection, directional momentum, trend bias, and optional volume filters.
During periods of low volatility, price consolidates and energy builds. When volatility expands again, strong directional moves often follow. This tool helps traders spot those opportunities early with clear visual cues and optional performance tracking.
█ KEY FEATURES
- Squeeze detection using Bollinger Bands inside Keltner Channels
- Automatic identification of volatility expansion after the squeeze ends
- Optional filters for momentum, trend direction, volume, and signal cooldown
- Dynamic color fills for squeeze, bullish expansion, bearish expansion, and neutral states
- Dashboard showing squeeze duration, tightness, momentum, trend, and volume context
- Optional win-rate analytics using ATR-based target and stop evaluation
- Multi-timeframe confirmation for higher-quality breakouts
█ HOW IT WORKS
- A squeeze occurs when both Bollinger Bands sit inside the Keltner Channels.
- A breakout begins when the Bollinger Bands expand outside the KCs.
- Long signals appear when squeeze release aligns with bullish momentum and trend strength.
- Short signals appear when bearish momentum and trend conditions agree.
- Volume and cooldown filters help reduce noise and avoid low-quality entries.
█ HOW TO USE
- Wait for a squeeze period (yellow fill).
- Monitor duration and tightness: longer/tighter squeezes often lead to stronger moves.
- When a long or short signal appears, use the plotted ATR-based target and stop as reference levels.
- Watch for contraction or exit hints when momentum fades or volatility narrows again.
- Higher timeframes generally provide cleaner and more reliable signals.
█ TIMEFRAME GUIDANCE
- Crypto: 4H or 1D; consider increasing KC multiplier for high volatility.
- Forex: 1H–4H; longer squeeze duration can improve selectivity.
- Stocks: 1D–1W; consider slightly higher BB multiplier on slow-moving markets.
█ SETTINGS SUMMARY
- Adjustable Bollinger Band and Keltner Channel lengths and multipliers
- Three momentum modes: Linear Regression, Price–SMA, or ROC
- Trend and volume filters (optional)
- Configurable minimum squeeze duration and signal cooldown
- ATR-based target and stop multipliers
- Optional historically tight squeeze filter (percentile-based)
█ ALERTS
- Squeeze Detected
- Squeeze Released
- Long Entry
- Short Entry
- Exit Hint
- Historically Tight Squeeze
█ NOTES
- ATR-based win-rate calculations provide simplified performance estimates.
- Past behavior does not guarantee future movement.
- Use position sizing and risk management appropriate for the instrument and timeframe.
█ CREDITS
Inspired by the Bollinger Band and Keltner Channel squeeze concept popularized by John Carter’s TTM Squeeze, with added enhancements for squeeze strength, filtering, and real-time performance metrics.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Eric Thies
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Eric Thies
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.