OPEN-SOURCE SCRIPT
Telah dikemas kini Consolidation Zones Volume Delta | Flux Charts

GENERAL OVERVIEW:
The Consolidation Zones Volume Delta | Flux Charts indicator is designed to identify and visualize consolidation zones on the chart. Rather than only outlining areas of sideways price movement, the indicator analyzes volume activity occurring inside each consolidation zone. This is done by aggregating lower-timeframe volume data into the higher-timeframe consolidation range, allowing users to see how buying and selling activity evolves while price remains in a range.
What is the theory behind the indicator?:
The indicator is built around three core analytical concepts that guide how consolidation zones are detected and evaluated.
1. Consolidation as a structural phase
Periods of consolidation are characterized by reduced directional movement and compressed price ranges. During these phases, price action often alternates within a defined high–low boundary, creating a structure that can be objectively measured and tracked over time.
2. Volume behavior inside consolidation
While price may appear balanced within a consolidation range, volume activity inside that range can vary. The indicator evaluates volume contributions occurring within the vertical boundaries of the consolidation zone by using lower-timeframe data and weighting each candle’s volume based on its overlap with the zone. This produces an internal volume delta profile that reflects how buying and selling volume accumulates throughout the consolidation.
Delta behavior inside a zone may show:
3. Markets consolidate in multiple ways, one detection method is not enough
Markets do not consolidate in a single, uniform way. To account for this, the indicator includes three distinct consolidation detection methods. Each method is calculated objectively, does not repaint, and targets a different type of sideways or low-expansion price behavior:
CONSOLIDATION ZONES VOLUME DELTA FEATURES:
The Consolidation Zones Volume Delta indicator includes 4 main features:
CONSOLIDATION ZONES:
🔹What is a Consolidation Zone?
A consolidation zone is a defined price range where market movement becomes compressed and price remains contained within clear upper and lower boundaries for a sustained period of time. During this phase, price does not establish a strong directional trend and instead oscillates within a relatively narrow range.
🔹Consolidation Zone Detection
The indicator automatically detects consolidation zones using three independent, rule-based methods. Each method evaluates a different market condition and can be selected individually depending on how you want consolidation to be defined. Regardless of the method used, all zones are calculated objectively and finalized once confirmed.
◇ Candles (Candle Compression)
The Candles method identifies consolidation by detecting periods of candle compression and reduced range expansion. A candle is considered part of a consolidation sequence when:
ATR is calculated using a 4-period average true range and is used as a volatility reference. If consecutive candles continue to meet these compression conditions, the indicator increments an internal count.
Under the Consolidation Candles section in the settings, you’ll find two controls.
This defines how many consecutive compressed candles are required before a consolidation zone is confirmed. Candle compression is determined using candle structure and short-term ATR, ensuring that only periods of reduced range expansion are counted. Once the minimum threshold is reached, the indicator creates a consolidation zone using the highest high and lowest low formed during the compressed sequence.

When enabled, the indicator highlights candles that meet the compression criteria, making it easy to visually identify which candles contributed to the formation of the consolidation zone.

◇ ADX (Low Trend Strength)
The ADX method identifies consolidation based on weak or declining trend strength rather than candle structure. This method uses the Average Directional Index (ADX) to determine when directional movement is reduced.
ADX is calculated using directional movement values that are smoothed over time. When ADX remains below a user-defined threshold, price is treated as being in a low-trend market. While this condition persists, the indicator tracks the highest high and lowest low formed during the low-trend period.
Under the ADX Settings section in the settings, you’ll find the following controls.
Defines the lookback period used to calculate directional movement for ADX.
Controls the smoothing applied to the ADX calculation.
Sets the level below which ADX must remain for the market to be considered consolidating.
Defines how many consecutive candles’ ADX must stay below the threshold before a consolidation zone is confirmed. Once this requirement is met, the indicator creates a consolidation zone using the accumulated high and low from the low-trend window.
When enabled, the indicator highlights candles where ADX remains below the threshold.

◇ Visual Range
The Visual Range method identifies consolidation by detecting clearly defined horizontal price ranges where price remains contained for a sustained period of time. The indicator continuously tracks the rolling highest high and lowest low across recent candles. When price remains inside the same high–low boundaries without breaking above or below the range, an internal counter advances.
Under the Visual Range section in the settings, you’ll find the following control.
Defines how many consecutive candles must remain fully contained within the same high–low range before a consolidation zone is confirmed. Once this requirement is met, the indicator creates a consolidation zone using the established range boundaries.

🔹Consolidation Zone Settings
◇ Invalidation Method
Users can choose how Consolidation Zones are invalidated, selecting between Close Break or Wick Break.


◇ Merge Overlapping Zones
When enabled, overlapping Consolidation Zones are automatically combined into one unified zone.

◇ Show Last
This setting determines how many Consolidation Zones are displayed on your chart. For example, setting this to 5 will display the 5 most recent zones.
VOLUME DELTA:
Delta Volume visualizes how buying and selling volume accumulates inside each consolidation zone. Instead of using the full candle volume, the indicator isolates only the volume that occurs within the vertical boundaries of the zone. This allows you to see whether bullish or bearish volume is dominating while price remains range-bound. The visualization updates in real time while the zone is active and reflects cumulative participation rather than individual candles.

🔹How Volume Delta is Calculated
Delta Volume is calculated using lower-timeframe data and applied to the higher-timeframe consolidation zone.
🔹Volume Delta Settings
◇ Enable
Turns the Delta Volume visualization on or off. Consolidation zones continue to plot when disabled.
◇ Show Delta %
Displays the percentage breakdown of bullish versus bearish volume inside the consolidation zone. Percentages are derived from cumulative volume totals.

◇ 3D Visual
When enabled, the delta blocks are extended diagonally using a depth offset derived from the instrument’s daily ATR. This creates visible side faces and top faces for the delta blocks, simulating depth without altering any calculations. The 3D effect is purely visual. It does not change how volume is calculated, weighted, or accumulated.

Users can control the intensity of the 3D effect choosing a value between 1 and 5. Increasing this value increases:
Higher values produce a more pronounced 3D appearance by pushing the delta visualization further away from the consolidation box. Lower values keep the visualization flatter and closer to the box boundaries. The depth scaling is normalized using ATR, so the effect adapts proportionally to the instrument’s volatility.

◇ Volume Delta Display Style
Controls how bullish and bearish volume are displayed inside the Consolidation Zone:

◇ Timeframe
Defines the lower timeframe used for Volume Delta calculations. When a timeframe is selected, the indicator pulls lower-timeframe price and volume data and maps it into the higher-timeframe consolidation zone. Each lower-timeframe candle is evaluated individually. Only the portion of its volume that vertically overlaps the consolidation zone is included, and that volume is weighted based on the candle’s overlap with the zone’s price range. If the Timeframe field is left empty, the indicator defaults to using the chart’s current timeframe for delta calculations.
Using a lower timeframe increases the granularity of the delta calculation, allowing volume changes inside the zone to be measured more precisely. Using a higher timeframe produces a smoother, less granular delta profile.
Please Note: Delta rendering is automatically limited to available lower-timeframe data to prevent incomplete or distorted visuals when historical lower-timeframe volume is unavailable due to TradingView data limits.
STANDARD DEVIATION BANDS:
Standard Deviation Bands project measured price distance away from a confirmed consolidation zone using the size of that zone as the reference unit. Rather than calculating volatility from historical price dispersion, the bands are derived directly from the height of the consolidation range itself. Each band represents a fixed multiple of the consolidation zone’s height and is plotted symmetrically above and below the zone.
🔹How the bands are calculated
Once a consolidation zone is finalized, the indicator calculates the zone height as:
This value becomes the base measurement for all deviation calculations. For each enabled band:
The distance of each band from the zone is calculated by multiplying the zone height by the selected band multiplier. These band levels are fixed relative to the consolidation zone and do not recalculate based on future price movement.

🔹Standard Deviation Band Settings
◇ Band 1
Enables the first deviation band above and below the consolidation zone. The Band 1 multiplier defines how far the band is placed from the zone in terms of zone height. For example, a multiplier of 1 plots the band one full zone height above and below the consolidation range.
◇ Band 2
Enables a second deviation band at a greater distance from the consolidation zone. Band 2 uses its own multiplier and is calculated independently of Band 1, allowing multiple expansion levels to be displayed simultaneously.
◇ Fill Bands
When enabled, the area between the consolidation zone and each deviation band is filled with a semi-transparent color. Upper fills apply to bands above the zone, and lower fills apply to bands below the zone. Fills are static and tied directly to the consolidation zone boundaries.

◇ Color Customization
Each deviation band has independent color controls for:
This allows users to visually distinguish between bullish and bearish extensions as well as between multiple deviation levels.
ALERTS:
Users can create alerts for the following:
UNIQUENESS:
This indicator combines multiple consolidation detection methods with lower-timeframe volume delta analysis inside each consolidation zone. It visualizes bullish and bearish volume using weighted overlap logic and optional 3D rendering for improved clarity. Users can choose how volume is displayed, apply structure-based deviation bands, and enable alerts for new zones and zone breaks. All features are rule-based, configurable, and designed to work together within a single framework.
The Consolidation Zones Volume Delta | Flux Charts indicator is designed to identify and visualize consolidation zones on the chart. Rather than only outlining areas of sideways price movement, the indicator analyzes volume activity occurring inside each consolidation zone. This is done by aggregating lower-timeframe volume data into the higher-timeframe consolidation range, allowing users to see how buying and selling activity evolves while price remains in a range.
What is the theory behind the indicator?:
The indicator is built around three core analytical concepts that guide how consolidation zones are detected and evaluated.
1. Consolidation as a structural phase
Periods of consolidation are characterized by reduced directional movement and compressed price ranges. During these phases, price action often alternates within a defined high–low boundary, creating a structure that can be objectively measured and tracked over time.
2. Volume behavior inside consolidation
While price may appear balanced within a consolidation range, volume activity inside that range can vary. The indicator evaluates volume contributions occurring within the vertical boundaries of the consolidation zone by using lower-timeframe data and weighting each candle’s volume based on its overlap with the zone. This produces an internal volume delta profile that reflects how buying and selling volume accumulates throughout the consolidation.
Delta behavior inside a zone may show:
- Persistent dominance of buying or selling volume
- Alternating shifts between buyers and sellers
- Periods of relatively balanced participation
3. Markets consolidate in multiple ways, one detection method is not enough
Markets do not consolidate in a single, uniform way. To account for this, the indicator includes three distinct consolidation detection methods. Each method is calculated objectively, does not repaint, and targets a different type of sideways or low-expansion price behavior:
- Candle Compression
- ADX Low Trend Strength
- Visual Range Boundaries
CONSOLIDATION ZONES VOLUME DELTA FEATURES:
The Consolidation Zones Volume Delta indicator includes 4 main features:
- Consolidation Zones
- Volume Delta
- Standard Deviation Bands
- Alerts
CONSOLIDATION ZONES:
🔹What is a Consolidation Zone?
A consolidation zone is a defined price range where market movement becomes compressed and price remains contained within clear upper and lower boundaries for a sustained period of time. During this phase, price does not establish a strong directional trend and instead oscillates within a relatively narrow range.
🔹Consolidation Zone Detection
The indicator automatically detects consolidation zones using three independent, rule-based methods. Each method evaluates a different market condition and can be selected individually depending on how you want consolidation to be defined. Regardless of the method used, all zones are calculated objectively and finalized once confirmed.
◇ Candles (Candle Compression)
The Candles method identifies consolidation by detecting periods of candle compression and reduced range expansion. A candle is considered part of a consolidation sequence when:
- The candle body is small relative to its total range
- The candle’s high–low range is smaller than the short-term Average True Range (ATR)
ATR is calculated using a 4-period average true range and is used as a volatility reference. If consecutive candles continue to meet these compression conditions, the indicator increments an internal count.
Under the Consolidation Candles section in the settings, you’ll find two controls.
- Min. Consolidation Candles setting
This defines how many consecutive compressed candles are required before a consolidation zone is confirmed. Candle compression is determined using candle structure and short-term ATR, ensuring that only periods of reduced range expansion are counted. Once the minimum threshold is reached, the indicator creates a consolidation zone using the highest high and lowest low formed during the compressed sequence.
- Mark Consolidation Candles
When enabled, the indicator highlights candles that meet the compression criteria, making it easy to visually identify which candles contributed to the formation of the consolidation zone.
◇ ADX (Low Trend Strength)
The ADX method identifies consolidation based on weak or declining trend strength rather than candle structure. This method uses the Average Directional Index (ADX) to determine when directional movement is reduced.
ADX is calculated using directional movement values that are smoothed over time. When ADX remains below a user-defined threshold, price is treated as being in a low-trend market. While this condition persists, the indicator tracks the highest high and lowest low formed during the low-trend period.
Under the ADX Settings section in the settings, you’ll find the following controls.
- ADX Length
Defines the lookback period used to calculate directional movement for ADX.
- ADX Smoothing
Controls the smoothing applied to the ADX calculation.
- ADX Threshold
Sets the level below which ADX must remain for the market to be considered consolidating.
- Consolidation Strength
Defines how many consecutive candles’ ADX must stay below the threshold before a consolidation zone is confirmed. Once this requirement is met, the indicator creates a consolidation zone using the accumulated high and low from the low-trend window.
- Mark Candles Below Threshold
When enabled, the indicator highlights candles where ADX remains below the threshold.
◇ Visual Range
The Visual Range method identifies consolidation by detecting clearly defined horizontal price ranges where price remains contained for a sustained period of time. The indicator continuously tracks the rolling highest high and lowest low across recent candles. When price remains inside the same high–low boundaries without breaking above or below the range, an internal counter advances.
Under the Visual Range section in the settings, you’ll find the following control.
- Min. Candles in Range
Defines how many consecutive candles must remain fully contained within the same high–low range before a consolidation zone is confirmed. Once this requirement is met, the indicator creates a consolidation zone using the established range boundaries.
🔹Consolidation Zone Settings
◇ Invalidation Method
Users can choose how Consolidation Zones are invalidated, selecting between Close Break or Wick Break.
- Close Break: A Consolidation Zone is invalidated when a candle closes above/below the zone.
- Wick Break: A Consolidation Zone is invalidated when a candle’s wick goes above/below the zone.
◇ Merge Overlapping Zones
When enabled, overlapping Consolidation Zones are automatically combined into one unified zone.
◇ Show Last
This setting determines how many Consolidation Zones are displayed on your chart. For example, setting this to 5 will display the 5 most recent zones.
VOLUME DELTA:
Delta Volume visualizes how buying and selling volume accumulates inside each consolidation zone. Instead of using the full candle volume, the indicator isolates only the volume that occurs within the vertical boundaries of the zone. This allows you to see whether bullish or bearish volume is dominating while price remains range-bound. The visualization updates in real time while the zone is active and reflects cumulative participation rather than individual candles.
🔹How Volume Delta is Calculated
Delta Volume is calculated using lower-timeframe data and applied to the higher-timeframe consolidation zone.
- Each candle’s volume is split into bullish or bearish volume based on candle direction.
- Lower-timeframe candles are pulled using the selected delta timeframe.
- For each lower-timeframe candle, only the portion of volume that vertically overlaps the consolidation zone is counted.
- Volume is weighted by the amount of overlap between the candle’s range and the zone’s range.
- Bullish and bearish volume are accumulated over time to form a running, cumulative delta profile for the zone.
🔹Volume Delta Settings
◇ Enable
Turns the Delta Volume visualization on or off. Consolidation zones continue to plot when disabled.
◇ Show Delta %
Displays the percentage breakdown of bullish versus bearish volume inside the consolidation zone. Percentages are derived from cumulative volume totals.
◇ 3D Visual
When enabled, the delta blocks are extended diagonally using a depth offset derived from the instrument’s daily ATR. This creates visible side faces and top faces for the delta blocks, simulating depth without altering any calculations. The 3D effect is purely visual. It does not change how volume is calculated, weighted, or accumulated.
Users can control the intensity of the 3D effect choosing a value between 1 and 5. Increasing this value increases:
- The horizontal offset of the delta blocks
- The vertical depth projection applied to the volume faces
Higher values produce a more pronounced 3D appearance by pushing the delta visualization further away from the consolidation box. Lower values keep the visualization flatter and closer to the box boundaries. The depth scaling is normalized using ATR, so the effect adapts proportionally to the instrument’s volatility.
◇ Volume Delta Display Style
Controls how bullish and bearish volume are displayed inside the Consolidation Zone:
- Horizontal: Volume is split top-to-bottom within the zone
- Vertical: Volume is split left-to-right across the zone
◇ Timeframe
Defines the lower timeframe used for Volume Delta calculations. When a timeframe is selected, the indicator pulls lower-timeframe price and volume data and maps it into the higher-timeframe consolidation zone. Each lower-timeframe candle is evaluated individually. Only the portion of its volume that vertically overlaps the consolidation zone is included, and that volume is weighted based on the candle’s overlap with the zone’s price range. If the Timeframe field is left empty, the indicator defaults to using the chart’s current timeframe for delta calculations.
Using a lower timeframe increases the granularity of the delta calculation, allowing volume changes inside the zone to be measured more precisely. Using a higher timeframe produces a smoother, less granular delta profile.
Please Note: Delta rendering is automatically limited to available lower-timeframe data to prevent incomplete or distorted visuals when historical lower-timeframe volume is unavailable due to TradingView data limits.
STANDARD DEVIATION BANDS:
Standard Deviation Bands project measured price distance away from a confirmed consolidation zone using the size of that zone as the reference unit. Rather than calculating volatility from historical price dispersion, the bands are derived directly from the height of the consolidation range itself. Each band represents a fixed multiple of the consolidation zone’s height and is plotted symmetrically above and below the zone.
🔹How the bands are calculated
Once a consolidation zone is finalized, the indicator calculates the zone height as:
- Zone Height = Zone High − Zone Low
This value becomes the base measurement for all deviation calculations. For each enabled band:
- Upper bands are placed above the consolidation zone’s high
- Lower bands are placed below the consolidation zone’s low
The distance of each band from the zone is calculated by multiplying the zone height by the selected band multiplier. These band levels are fixed relative to the consolidation zone and do not recalculate based on future price movement.
🔹Standard Deviation Band Settings
◇ Band 1
Enables the first deviation band above and below the consolidation zone. The Band 1 multiplier defines how far the band is placed from the zone in terms of zone height. For example, a multiplier of 1 plots the band one full zone height above and below the consolidation range.
◇ Band 2
Enables a second deviation band at a greater distance from the consolidation zone. Band 2 uses its own multiplier and is calculated independently of Band 1, allowing multiple expansion levels to be displayed simultaneously.
◇ Fill Bands
When enabled, the area between the consolidation zone and each deviation band is filled with a semi-transparent color. Upper fills apply to bands above the zone, and lower fills apply to bands below the zone. Fills are static and tied directly to the consolidation zone boundaries.
◇ Color Customization
Each deviation band has independent color controls for:
- Upper band lines and fills
- Lower band lines and fills
This allows users to visually distinguish between bullish and bearish extensions as well as between multiple deviation levels.
ALERTS:
Users can create alerts for the following:
- New Consolidation Zone Formed
- Consolidation Zone Break
UNIQUENESS:
This indicator combines multiple consolidation detection methods with lower-timeframe volume delta analysis inside each consolidation zone. It visualizes bullish and bearish volume using weighted overlap logic and optional 3D rendering for improved clarity. Users can choose how volume is displayed, apply structure-based deviation bands, and enable alerts for new zones and zone breaks. All features are rule-based, configurable, and designed to work together within a single framework.
Nota Keluaran
1. Fixed a minor issue affecting consolidation breakout alerts.2. Adjusted the default Consolidation Strength setting for more consistent zone detection.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Access Flux Charts' exclusive indicators: fluxcharts.com/
Join our Discord community: discord.gg/FluxCharts
Join our Discord community: discord.gg/FluxCharts
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Access Flux Charts' exclusive indicators: fluxcharts.com/
Join our Discord community: discord.gg/FluxCharts
Join our Discord community: discord.gg/FluxCharts
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.