🟢 Overview
The Volume Bubbles indicator is a multi-layered volume cluster detection system that identifies statistically significant volume events directly on your price chart, classifying them by magnitude (Small, Medium, Big) and direction (Buy, Sell, Mixed). By combining adaptive percentile thresholds across multiple lookback windows with optional volume delta analysis, this indicator highlights moments of elevated trading activity that often signal institutional participation, trend acceleration, or potential reversals across every timeframe and market.

🟢 How It Works
The indicator begins by establishing a lower timeframe for volume delta calculation. When auto-select is enabled, it picks a granular timeframe based on your chart period, using 1-second bars for sub-minute charts, 1-minute bars for intraday charts, 5-minute bars for daily charts, and 60-minute bars for higher timeframes. This allows the indicator to estimate net buying and selling pressure within each chart bar:
Pine Script®
The core detection engine then calculates percentile thresholds for both volume and absolute delta across three independent lookback windows (Short, Medium, Long). Each window computes its own threshold for each cluster tier using linear interpolation:
Pine Script®
This means a bar's volume is not compared against a single average but ranked against the full distribution of recent volume history from multiple perspectives. A Small cluster must exceed the 75th percentile (top 25%), a Medium cluster the 90th percentile (top 10%), and a Big cluster the 97th percentile (top 3%) by default.

To filter noise, a consensus system requires agreement across the lookback windows before confirming a cluster:
Pine Script®
In Majority mode, for example, at least two of the three windows must agree that volume exceeds the threshold before a cluster is plotted. This prevents false signals from temporary spikes that look significant in one context but not another.

Once a cluster is confirmed, it is classified as Buy, Sell, or Mixed based on the selected method. Candle Direction uses the bar's open/close relationship, Delta Direction uses the sign of net volume delta, and Both requires agreement between the two, labeling any conflict as Mixed.

🟢 Key Features
▶ The indicator offers four detection methods, each designed to balance sensitivity and precision depending on data availability and trading style.

1. Volume Only: Uses raw bar volume as the sole input for cluster detection. This is the simplest and most universal mode, working on any symbol that provides volume data. It identifies all statistically elevated volume events regardless of whether buying or selling dominated, making it useful for spotting general activity surges around key levels, news events, or session opens.
2. Delta Only: Uses the absolute value of net volume delta instead of total volume. This mode triggers only when directional pressure (not just raw activity) is statistically elevated. It filters out high-volume bars where buying and selling were roughly balanced, focusing instead on bars where one side clearly dominated. Requires lower timeframe data availability.
3. Volume + Delta: Both volume and delta must independently exceed their respective percentile thresholds. This is the strictest detection mode. A cluster only appears when there is both unusually high total activity and unusually strong directional flow, filtering out ambiguous bars where volume was high but evenly split between buyers and sellers.
4. Volume OR Delta: Either elevated volume or elevated directional delta triggers a cluster. This is the most inclusive mode, capturing both pure volume events (such as index rebalancing or option expiration activity) and strong directional surges that may occur on relatively normal total volume. Best suited for traders who prefer broader coverage and are comfortable filtering signals with additional context.
▶ Detailed Tooltip Overlay: Hovering over any bubble reveals a comprehensive diagnostic panel summarizing the full context behind that cluster. The tooltip displays the cluster tier and direction label (e.g., BIG BUY or MEDIUM SELL), the formatted volume value, net delta value (or "n/a" if delta data is unavailable), the volume-to-average ratio expressed as a multiple, the active detection method (with a fallback note if delta was unavailable and the method defaulted to Volume Only), the individual window confirmations for both volume and delta shown as a compact S M L grid indicating which of the short, medium, and long lookback windows passed their threshold, and the classification mode used to determine the buy/sell label. This gives full transparency into exactly why each cluster was detected and how it was classified, without cluttering the chart itself.

▶ Built-in Alert System: Pre-configured alert conditions for Big clusters, Medium-or-larger clusters, and any cluster detection, allowing you to receive notifications for the volume events that matter most to your strategy.

▶ Visual Customization: Choose from 5 color presets (Classic, Aqua, Cosmic, Cyber, Neon) or define your own custom color scheme. Optional in-bubble text displays volume, delta, ratio, or combinations, while the tooltip diagnostic panel remains accessible on hover regardless of whether bubble labels are enabled or disabled.

🟢 Important Notes
1. This indicator requires volume data to function. Make sure you are using a ticker from an exchange that provides volume data. Symbols that do not report volume (such as certain forex pairs on specific brokers or custom-built indices) will trigger a warning message on the chart and produce no signals. If you see the "No Volume Data" warning, switch to a symbol or exchange that supports volume reporting.

2. Whether you are scalping on lower timeframes or swing trading on daily and weekly charts, Volume Bubbles is designed to complement your existing setup rather than replace it. Use it as a confirmation layer alongside your preferred strategy to identify when statistically significant volume activity aligns with your trade thesis, adding a data-driven edge to entries, exits, and key level analysis across any timeframe and market.
The Volume Bubbles indicator is a multi-layered volume cluster detection system that identifies statistically significant volume events directly on your price chart, classifying them by magnitude (Small, Medium, Big) and direction (Buy, Sell, Mixed). By combining adaptive percentile thresholds across multiple lookback windows with optional volume delta analysis, this indicator highlights moments of elevated trading activity that often signal institutional participation, trend acceleration, or potential reversals across every timeframe and market.
🟢 How It Works
The indicator begins by establishing a lower timeframe for volume delta calculation. When auto-select is enabled, it picks a granular timeframe based on your chart period, using 1-second bars for sub-minute charts, 1-minute bars for intraday charts, 5-minute bars for daily charts, and 60-minute bars for higher timeframes. This allows the indicator to estimate net buying and selling pressure within each chart bar:
[_, _, _, lastDelta] = taLib.requestVolumeDelta(lowerTimeframe)
float netDelta = nz(lastDelta)
float absDelta = math.abs(netDelta)
The core detection engine then calculates percentile thresholds for both volume and absolute delta across three independent lookback windows (Short, Medium, Long). Each window computes its own threshold for each cluster tier using linear interpolation:
float vSmallShort = ta.percentile_linear_interpolation(volume, shortLen, smallPct)
float vSmallMid = ta.percentile_linear_interpolation(volume, midLen, smallPct)
float vSmallLong = ta.percentile_linear_interpolation(volume, longLen, smallPct)
This means a bar's volume is not compared against a single average but ranked against the full distribution of recent volume history from multiple perspectives. A Small cluster must exceed the 75th percentile (top 25%), a Medium cluster the 90th percentile (top 10%), and a Big cluster the 97th percentile (top 3%) by default.
To filter noise, a consensus system requires agreement across the lookback windows before confirming a cluster:
f_consensus(bool pS, bool pM, bool pL, string mode) =>
int hits = (pS ? 1 : 0) + (pM ? 1 : 0) + (pL ? 1 : 0)
switch mode
"Any Window" => hits >= 1
"Majority (2 of 3)" => hits >= 2
"All Windows (strictest)" => hits >= 3
In Majority mode, for example, at least two of the three windows must agree that volume exceeds the threshold before a cluster is plotted. This prevents false signals from temporary spikes that look significant in one context but not another.
Once a cluster is confirmed, it is classified as Buy, Sell, or Mixed based on the selected method. Candle Direction uses the bar's open/close relationship, Delta Direction uses the sign of net volume delta, and Both requires agreement between the two, labeling any conflict as Mixed.
🟢 Key Features
▶ The indicator offers four detection methods, each designed to balance sensitivity and precision depending on data availability and trading style.
1. Volume Only: Uses raw bar volume as the sole input for cluster detection. This is the simplest and most universal mode, working on any symbol that provides volume data. It identifies all statistically elevated volume events regardless of whether buying or selling dominated, making it useful for spotting general activity surges around key levels, news events, or session opens.
2. Delta Only: Uses the absolute value of net volume delta instead of total volume. This mode triggers only when directional pressure (not just raw activity) is statistically elevated. It filters out high-volume bars where buying and selling were roughly balanced, focusing instead on bars where one side clearly dominated. Requires lower timeframe data availability.
3. Volume + Delta: Both volume and delta must independently exceed their respective percentile thresholds. This is the strictest detection mode. A cluster only appears when there is both unusually high total activity and unusually strong directional flow, filtering out ambiguous bars where volume was high but evenly split between buyers and sellers.
4. Volume OR Delta: Either elevated volume or elevated directional delta triggers a cluster. This is the most inclusive mode, capturing both pure volume events (such as index rebalancing or option expiration activity) and strong directional surges that may occur on relatively normal total volume. Best suited for traders who prefer broader coverage and are comfortable filtering signals with additional context.
▶ Detailed Tooltip Overlay: Hovering over any bubble reveals a comprehensive diagnostic panel summarizing the full context behind that cluster. The tooltip displays the cluster tier and direction label (e.g., BIG BUY or MEDIUM SELL), the formatted volume value, net delta value (or "n/a" if delta data is unavailable), the volume-to-average ratio expressed as a multiple, the active detection method (with a fallback note if delta was unavailable and the method defaulted to Volume Only), the individual window confirmations for both volume and delta shown as a compact S M L grid indicating which of the short, medium, and long lookback windows passed their threshold, and the classification mode used to determine the buy/sell label. This gives full transparency into exactly why each cluster was detected and how it was classified, without cluttering the chart itself.
▶ Built-in Alert System: Pre-configured alert conditions for Big clusters, Medium-or-larger clusters, and any cluster detection, allowing you to receive notifications for the volume events that matter most to your strategy.
▶ Visual Customization: Choose from 5 color presets (Classic, Aqua, Cosmic, Cyber, Neon) or define your own custom color scheme. Optional in-bubble text displays volume, delta, ratio, or combinations, while the tooltip diagnostic panel remains accessible on hover regardless of whether bubble labels are enabled or disabled.
🟢 Important Notes
1. This indicator requires volume data to function. Make sure you are using a ticker from an exchange that provides volume data. Symbols that do not report volume (such as certain forex pairs on specific brokers or custom-built indices) will trigger a warning message on the chart and produce no signals. If you see the "No Volume Data" warning, switch to a symbol or exchange that supports volume reporting.
2. Whether you are scalping on lower timeframes or swing trading on daily and weekly charts, Volume Bubbles is designed to complement your existing setup rather than replace it. Use it as a confirmation layer alongside your preferred strategy to identify when statistically significant volume activity aligns with your trade thesis, adding a data-driven edge to entries, exits, and key level analysis across any timeframe and market.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
🎁 Access our best trading & investing tools here (3-day FREE trial): whop.com/quantalgo/
🎁 Free Special Edition indicators: joinquantalgo.com/special-editions
🎁 Discord: discord.gg/hJaFyGEAyX
🎁 Free Special Edition indicators: joinquantalgo.com/special-editions
🎁 Discord: discord.gg/hJaFyGEAyX
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
🎁 Access our best trading & investing tools here (3-day FREE trial): whop.com/quantalgo/
🎁 Free Special Edition indicators: joinquantalgo.com/special-editions
🎁 Discord: discord.gg/hJaFyGEAyX
🎁 Free Special Edition indicators: joinquantalgo.com/special-editions
🎁 Discord: discord.gg/hJaFyGEAyX
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
