OPEN-SOURCE SCRIPT
Consolidation Boxes

Consolidation Boxes — Indicator
Overview:
This indicator automatically detects and highlights periods of market consolidation, drawing shaded boxes around tight price ranges where the market is temporarily indecisive. It’s designed to help traders easily identify when price is moving sideways — a key phase that often precedes a breakout.
Key Features:
-Automatic Consolidation Detection: Recognizes when a series of candles close within a defined range and marks the area as a consolidation zone.
-Customizable Parameters: Set how many candles must consolidate before a box is drawn.
-Breakout Alerts: Notifies you when price breaks out above or below a consolidation box — a potential signal for trade entries.
-Clean Chart Management: Optional setting to automatically remove old zones when new consolidations form.
-Dynamic Box Extension: As long as price stays within the box, the zone will continue to extend until a breakout occurs.
Inputs:
-Minimum Consolidation Candles: Define how many candles must fit within a range to confirm a consolidation zone.
-Terminate Old Zones: Automatically delete the previous zone when a new one is formed (optional).
How to use:
1. Add the Indicator: Apply it to any chart — works across all timeframes and markets (e.g., crypto, stocks, forex).
2. Adjust Parameters: Choose how many candles must consolidate to form a valid box. Enable or disable zone termination to fit your preference.
3. Watch the Boxes: The indicator draws a shaded box once it detects a valid consolidation zone. The box will continue to extend as long as price stays within the range.
4. Look for Breakouts: When price breaks above or below the box, a breakout is confirmed and an alert (if enabled) will trigger — great for breakout trading strategies.
5. Use in Strategy: Combine with volume, momentum indicators, or price action to validate breakouts and filter false signals.
Ideal For:
Traders who want to visually identify consolidation areas and trade breakout setups with minimal manual analysis. Especially useful for scalpers, day traders, and swing traders looking to anticipate volatility after quiet periods.
Overview:
This indicator automatically detects and highlights periods of market consolidation, drawing shaded boxes around tight price ranges where the market is temporarily indecisive. It’s designed to help traders easily identify when price is moving sideways — a key phase that often precedes a breakout.
Key Features:
-Automatic Consolidation Detection: Recognizes when a series of candles close within a defined range and marks the area as a consolidation zone.
-Customizable Parameters: Set how many candles must consolidate before a box is drawn.
-Breakout Alerts: Notifies you when price breaks out above or below a consolidation box — a potential signal for trade entries.
-Clean Chart Management: Optional setting to automatically remove old zones when new consolidations form.
-Dynamic Box Extension: As long as price stays within the box, the zone will continue to extend until a breakout occurs.
Inputs:
-Minimum Consolidation Candles: Define how many candles must fit within a range to confirm a consolidation zone.
-Terminate Old Zones: Automatically delete the previous zone when a new one is formed (optional).
How to use:
1. Add the Indicator: Apply it to any chart — works across all timeframes and markets (e.g., crypto, stocks, forex).
2. Adjust Parameters: Choose how many candles must consolidate to form a valid box. Enable or disable zone termination to fit your preference.
3. Watch the Boxes: The indicator draws a shaded box once it detects a valid consolidation zone. The box will continue to extend as long as price stays within the range.
4. Look for Breakouts: When price breaks above or below the box, a breakout is confirmed and an alert (if enabled) will trigger — great for breakout trading strategies.
5. Use in Strategy: Combine with volume, momentum indicators, or price action to validate breakouts and filter false signals.
Ideal For:
Traders who want to visually identify consolidation areas and trade breakout setups with minimal manual analysis. Especially useful for scalpers, day traders, and swing traders looking to anticipate volatility after quiet periods.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.