OPEN-SOURCE SCRIPT
Atualizado Squeeze & Structure

Title: Ultimate Squeeze & Market Structure
Description: This all-in-one trading system combines two of the most powerful concepts in technical analysis: Volatility Compression (The Squeeze) and Market Structure (SMC).
It is designed to solve the biggest problem breakout traders face: False Breakouts. By waiting for a Volatility Squeeze to release energy, and confirming it with a structural Break of Structure (BoS) or Change of Character (CHoCH), traders can identify high-probability setups with precision.
How It Works (The "Trifecta" Logic):
1. The Energy (The Squeeze): Using the classic TTM Squeeze logic, the indicator monitors the relationship between Bollinger Bands (price volatility) and Keltner Channels (average range).
Red Cloud: Volatility is compressed. The market is coiling like a spring. This is the Setup Phase.
Breakout: When price expands outside the bands, the energy is released.
2. The Structure (SMC & ZigZag): Built on a custom Non-Repainting ZigZag engine, the indicator objectively maps swing highs and lows to define the trend.
BoS (Break of Structure): Signals trend continuation. Price breaks a previous pivot in the direction of the trend.
CHoCH (Change of Character): Signals potential reversal. Price breaks a significant pivot in the opposite direction of the trend.
Ghost Line: A dotted line shows the live, developing leg of the ZigZag before it is confirmed, helping you anticipate the next pivot.
3. The Confluence (The Strategy): The most powerful signals occur when these two forces align.
Example: A Red Squeeze releases into a Bullish Breakout (Fuchsia Cloud), immediately followed by a Bullish CHoCH. This confirms that not only is volatility expanding, but the structural trend has officially reversed to the upside.
Visual Guide:
☁️ Cloud Colors (Volatility):
🟥 Red: Squeeze ON (Consolidation).
🟣 Fuchsia: Bullish Momentum Breakout.
🔵 Blue: Bearish Momentum Breakout.
🟡 Yellow: Armed/Waiting for Pullback (if Pullback mode is active).
⬜ Gray/Green: Normal Trending.
🏷️ Labels (Structure):
H / L: Confirmed Swing Highs and Lows.
BoS: Break of Structure (Trend Continuation).
CHoCH: Change of Character (Trend Reversal).
Features:
Dual Entry Modes: Choose between "Breakout" (immediate signal) or "Pullback" (waits for a retest of the midline).
Momentum Filter: Breakouts are only colored if the 20 SMA slope agrees with the direction.
Fully Customizable: Adjust ZigZag Sensitivity (Depth/Deviation), Squeeze lengths, and all colors.
Alerts: Triggers available for Squeeze Start, Breakouts, and Armed status.
Credits: This script incorporates concepts from the TTM Squeeze and standard Smart Money Concepts (SMC) market structure analysis. It uses a custom, non-repainting pivot detection algorithm to ensure historical accuracy.
Description: This all-in-one trading system combines two of the most powerful concepts in technical analysis: Volatility Compression (The Squeeze) and Market Structure (SMC).
It is designed to solve the biggest problem breakout traders face: False Breakouts. By waiting for a Volatility Squeeze to release energy, and confirming it with a structural Break of Structure (BoS) or Change of Character (CHoCH), traders can identify high-probability setups with precision.
How It Works (The "Trifecta" Logic):
1. The Energy (The Squeeze): Using the classic TTM Squeeze logic, the indicator monitors the relationship between Bollinger Bands (price volatility) and Keltner Channels (average range).
Red Cloud: Volatility is compressed. The market is coiling like a spring. This is the Setup Phase.
Breakout: When price expands outside the bands, the energy is released.
2. The Structure (SMC & ZigZag): Built on a custom Non-Repainting ZigZag engine, the indicator objectively maps swing highs and lows to define the trend.
BoS (Break of Structure): Signals trend continuation. Price breaks a previous pivot in the direction of the trend.
CHoCH (Change of Character): Signals potential reversal. Price breaks a significant pivot in the opposite direction of the trend.
Ghost Line: A dotted line shows the live, developing leg of the ZigZag before it is confirmed, helping you anticipate the next pivot.
3. The Confluence (The Strategy): The most powerful signals occur when these two forces align.
Example: A Red Squeeze releases into a Bullish Breakout (Fuchsia Cloud), immediately followed by a Bullish CHoCH. This confirms that not only is volatility expanding, but the structural trend has officially reversed to the upside.
Visual Guide:
☁️ Cloud Colors (Volatility):
🟥 Red: Squeeze ON (Consolidation).
🟣 Fuchsia: Bullish Momentum Breakout.
🔵 Blue: Bearish Momentum Breakout.
🟡 Yellow: Armed/Waiting for Pullback (if Pullback mode is active).
⬜ Gray/Green: Normal Trending.
🏷️ Labels (Structure):
H / L: Confirmed Swing Highs and Lows.
BoS: Break of Structure (Trend Continuation).
CHoCH: Change of Character (Trend Reversal).
Features:
Dual Entry Modes: Choose between "Breakout" (immediate signal) or "Pullback" (waits for a retest of the midline).
Momentum Filter: Breakouts are only colored if the 20 SMA slope agrees with the direction.
Fully Customizable: Adjust ZigZag Sensitivity (Depth/Deviation), Squeeze lengths, and all colors.
Alerts: Triggers available for Squeeze Start, Breakouts, and Armed status.
Credits: This script incorporates concepts from the TTM Squeeze and standard Smart Money Concepts (SMC) market structure analysis. It uses a custom, non-repainting pivot detection algorithm to ensure historical accuracy.
Notas de Lançamento
Title: Ultimate Squeeze & Market StructureDescription: This all-in-one trading system combines two of the most powerful concepts in technical analysis: Volatility Compression (The Squeeze) and Market Structure (SMC).
It is designed to solve the biggest problem breakout traders face: False Breakouts. By waiting for a Volatility Squeeze to release energy, and confirming it with a structural Break of Structure (BoS) or Change of Character (CHoCH), traders can identify high-probability setups with precision.
How It Works (The "Trifecta" Logic):
1. The Energy (The Squeeze): Using the classic TTM Squeeze logic, the indicator monitors the relationship between Bollinger Bands (price volatility) and Keltner Channels (average range).
Red Cloud: Volatility is compressed. The market is coiling like a spring. This is the Setup Phase.
Breakout: When price expands outside the bands, the energy is released.
2. The Structure (SMC & ZigZag): Built on a custom Non-Repainting ZigZag engine, the indicator objectively maps swing highs and lows to define the trend.
BoS (Break of Structure): Signals trend continuation. Price breaks a previous pivot in the direction of the trend.
CHoCH (Change of Character): Signals potential reversal. Price breaks a significant pivot in the opposite direction of the trend.
Ghost Line: A dotted line shows the live, developing leg of the ZigZag before it is confirmed, helping you anticipate the next pivot.
3. The Confluence (The Strategy): The most powerful signals occur when these two forces align.
Example: A Red Squeeze releases into a Bullish Breakout (Fuchsia Cloud), immediately followed by a Bullish CHoCH. This confirms that not only is volatility expanding, but the structural trend has officially reversed to the upside.
Visual Guide:
☁️ Cloud Colors (Volatility):
🟥 Red: Squeeze ON (Consolidation).
🟣 Fuchsia: Bullish Momentum Breakout.
🔵 Blue: Bearish Momentum Breakout.
⬜ Gray/Green: Normal Trending.
🏷️ Labels (Structure):
H / L: Confirmed Swing Highs and Lows.
BoS: Break of Structure (Trend Continuation).
CHoCH: Change of Character (Trend Reversal).
Features:
Dual Entry Modes: Choose between "Breakout" (immediate signal) or "Pullback" (waits for a retest of the midline).
Momentum Filter: Breakouts are only colored if the 20 SMA slope agrees with the direction.
Fully Customizable: Adjust ZigZag Sensitivity (Depth/Deviation), Squeeze lengths, and all colors.
Alerts: Triggers available for Squeeze Start, Breakouts, and Armed status.
Credits: This script incorporates concepts from the TTM Squeeze and standard Smart Money Concepts (SMC) market structure analysis. It uses a custom, non-repainting pivot detection algorithm to ensure historical accuracy.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.