OPEN-SOURCE SCRIPT
Güncellendi

Delta Volume Bubbles

344
Delta Volume Bubbles

Overview

The Delta Volume Bubbles indicator is an advanced order flow visualization tool that displays buying and selling pressure through dynamic bubble representations on your chart. Unlike traditional volume indicators that only show total volume, this indicator calculates the net delta volume (difference between buying and selling volume) and presents it as color-coded bubbles of varying sizes.

How It Works

Core Calculation Method

The indicator uses a sophisticated approach to estimate delta volume from standard OHLCV data:

1. Price Action Analysis: Analyzes the relationship between open, high, low, and close prices to determine market aggression
2. Body Ratio Calculation: body_ratio = |close - open| / (high - low)
3. Aggressive Factor: Applies multipliers based on price action:
- Strong moves (body_ratio > 0.7): 1.5x multiplier
- Moderate moves (body_ratio > 0.4): 1.2x multiplier
- Weak moves: 1.0x multiplier

4. Delta Volume Estimation:
- Buy Volume: price_change > 0 ? volume × aggressive_factor : 0
- Sell Volume: price_change < 0 ? volume × aggressive_factor : 0
- Net Delta: buy_volume - sell_volume

5. Delta Strength Normalization: delta_strength = |net_delta| / sma(volume, 20)

Percentile-Based Filtering

The indicator uses percentile filtering instead of fixed thresholds, making it adaptive to market conditions:

- Bubble Filter: Only shows bubbles when volume exceeds the specified percentile (default: 60%)
- Label Filter: Only displays numbers when volume exceeds a higher percentile (default: 90%)
- Dynamic Adaptation: Automatically adjusts to changing market volatility

Visual Elements

Bubble Sizes
- Tiny: Delta strength < 0.3
- Small: Delta strength 0.3 - 0.7
- Normal: Delta strength 0.7 - 1.2
- Large: Delta strength 1.2 - 2.0
- Huge: Delta strength > 2.0

Color Coding
- Aggressive Buy (Bright Green): Strong buying pressure with high body ratio
- Aggressive Sell (Bright Red): Strong selling pressure with high body ratio
- Passive Buy (Light Green): Moderate buying pressure
- Passive Sell (Light Red): Moderate selling pressure

Intensity Mode
Alternative coloring based on delta strength rather than flow direction:
- Gray: Low intensity (< 0.5)
- Blue: Medium intensity (0.5 - 1.0)
- Orange: High intensity (1.0 - 2.0)
- Red: Extreme intensity (> 2.0)

Parameters

Order Flow Settings
- Show Bubbles: Toggle bubble display on/off
- Bubble Volume %ile: Percentile threshold for bubble display (0-100%)
- Intensity Mode: Switch between flow-based and intensity-based coloring

Bubble Labels
- Show Numbers in Bubbles: Toggle numerical labels on/off
- Label Volume %ile: Higher percentile threshold for label display (0-100%)

Numbers are displayed in K-notation (e.g., 25000 → 25K, 1500000 → 1.5M) for better readability.

Ideal Usage Scenarios

Best Market Conditions
- High volume sessions: More accurate delta calculations
- Trending markets: Clear directional flow identification
- Breakout scenarios: Spot aggressive buying/selling at key levels
- Support/resistance testing: Identify accumulation vs distribution

Trading Applications
1. Entry Timing: Look for aggressive flow in your trade direction
2. Exit Signals: Watch for opposing aggressive flow
3. Trend Confirmation: Consistent flow direction confirms trends
4. Volume Climax: Huge bubbles may indicate exhaustion points

Optimization Tips

Parameter Adjustment
- Lower percentiles (40-60%): More bubbles, good for active markets
- Higher percentiles (70-90%): Fewer bubbles, focus on significant events
- Label percentile: Set 20-30% higher than bubble percentile for clarity

Visual Optimization
- Intensity mode: Better for identifying unusual volume spikes
- Flow mode: Better for directional bias analysis
- Label toggle: Turn off in crowded markets, on for key levels

Limitations

- Estimation-based: Uses approximation algorithms, not true order flow data
- Volume dependency: Requires accurate volume data to function properly
- Timeframe sensitivity: Works best on intraday timeframes with active volume
- Market hours: Most effective during high-volume trading sessions

Technical Notes

The indicator implements advanced Pine Script features including:
- Dynamic percentile calculations using ta.percentile_linear_interpolation()
- Conditional plotting with multiple size categories
- Custom number formatting functions
- Efficient label management to prevent display limits

This tool is designed for traders who want to understand the underlying buying and selling pressure beyond simple volume analysis, providing insights into market sentiment and potential turning points.
Sürüm Notları
Quick Update for version 2.0 !!

- Pine script v5 > v6
- Integrate with official Delta volume instead of using volume to calculate the data (using TradingView's official ta.requestVolumeDelta() function)
- Backward Compatibility: you can still use the old delta calculation method

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.