OPEN-SOURCE SCRIPT
Ultimate Squeeze & Breakout

Title: Ultimate Squeeze & Breakout
Description: This indicator is a volatility analysis tool designed to identify periods of market compression ("The Squeeze") and validate subsequent breakouts using momentum logic. It builds upon the classic relation between Bollinger Bands and Keltner Channels but adds a directional filter to reduce false signals.
The Problem It Solves: Standard squeeze indicators often signal a breakout the moment price exits the bands, even if the underlying trend is weak or flat. This can lead to entering "wicks" or fakeouts. This script solves this by requiring the Basis Line Slope to align with the breakout direction before generating a signal.
How It Works:
1. Compression (The Setup) The script monitors the relationship between Bollinger Bands (Standard Deviation) and Keltner Channels (ATR).
Red Cloud: When the Bollinger Bands contract completely inside the Keltner Channels, it indicates a critical drop in volatility. The market is coiling and storing energy.
2. The Momentum Filter (The Validation) Unlike basic squeeze indicators, a breakout is not signaled solely by price closing outside the bands.
Logic: The script calculates the slope of the 20-period Basis Line (Simple Moving Average).
Bullish Validation: Price > Upper Band AND Basis Line is sloping UP.
Bearish Validation: Price < Lower Band AND Basis Line is sloping DOWN.
Visual Guide:
🟥 Red Cloud: Squeeze ON. Volatility is compressed. Do not trade; wait for expansion.
🟣 Fuchsia Cloud: Bullish Breakout (Price released upward + Positive Momentum).
🔵 Blue Cloud: Bearish Breakout (Price released downward + Negative Momentum).
⬜ Gray/Green Cloud: Standard Trending phase (Volatility is normal).
Features:
Precision Inputs: Multipliers for Standard Deviation and ATR can be adjusted in 0.01 increments for fine-tuning sensitivity.
Visual Toggles: Option to color the neutral trending cloud Green or Gray based on preference.
Alerts: Built-in alerts for "Squeeze Started" and validated "Bullish/Bearish Breakouts."
Credits: Core mechanics based on the TTM Squeeze concept popularized by John Carter. Momentum filtering logic added for enhanced signal reliability.
Description: This indicator is a volatility analysis tool designed to identify periods of market compression ("The Squeeze") and validate subsequent breakouts using momentum logic. It builds upon the classic relation between Bollinger Bands and Keltner Channels but adds a directional filter to reduce false signals.
The Problem It Solves: Standard squeeze indicators often signal a breakout the moment price exits the bands, even if the underlying trend is weak or flat. This can lead to entering "wicks" or fakeouts. This script solves this by requiring the Basis Line Slope to align with the breakout direction before generating a signal.
How It Works:
1. Compression (The Setup) The script monitors the relationship between Bollinger Bands (Standard Deviation) and Keltner Channels (ATR).
Red Cloud: When the Bollinger Bands contract completely inside the Keltner Channels, it indicates a critical drop in volatility. The market is coiling and storing energy.
2. The Momentum Filter (The Validation) Unlike basic squeeze indicators, a breakout is not signaled solely by price closing outside the bands.
Logic: The script calculates the slope of the 20-period Basis Line (Simple Moving Average).
Bullish Validation: Price > Upper Band AND Basis Line is sloping UP.
Bearish Validation: Price < Lower Band AND Basis Line is sloping DOWN.
Visual Guide:
🟥 Red Cloud: Squeeze ON. Volatility is compressed. Do not trade; wait for expansion.
🟣 Fuchsia Cloud: Bullish Breakout (Price released upward + Positive Momentum).
🔵 Blue Cloud: Bearish Breakout (Price released downward + Negative Momentum).
⬜ Gray/Green Cloud: Standard Trending phase (Volatility is normal).
Features:
Precision Inputs: Multipliers for Standard Deviation and ATR can be adjusted in 0.01 increments for fine-tuning sensitivity.
Visual Toggles: Option to color the neutral trending cloud Green or Gray based on preference.
Alerts: Built-in alerts for "Squeeze Started" and validated "Bullish/Bearish Breakouts."
Credits: Core mechanics based on the TTM Squeeze concept popularized by John Carter. Momentum filtering logic added for enhanced signal reliability.
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.
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.
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.