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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.