OPEN-SOURCE SCRIPT

Magic Volume - Projected [MW]

167
Magic Volume – Projected [MW]

This lower-pane volume tool estimates the full-bar volume before the bar closes by measuring the current bar’s elapsed time and the rate of incoming volume. It then contrasts that “expected volume” against typical activity and recent momentum to spotlight potential burst conditions (breakout/acceleration), color-codes the live volume stream, and annotates when the projected surge is likely bullish or bearish based on bar structure and recent highs/lows.

Settings

Projected / Expected Volume
  • Moving Average: EMA length used for volume baseline comparisons. (Default: 14)
  • Minimum Volume: Hard floor the bar’s raw volume must exceed to qualify as notable. (Default: 10,000)
  • Consecutive Volume Above 14 EMA: Count required for “sustained” high-volume context. (Default: 3)


Stochastic Volume Burst
  • Stochastic Length: Window for the Stochastic calculation on volume. (Default: 8)
  • Smoothing: Smoothing applied to Stochastic volume and its signal. (Default: 3)
  • Stochastic Volume Breakout Threshold: Level above which Stochastic volume is considered a breakout. (Default: 20)
  • Volume Bar Increase Amount: Multiplier the current bar’s volume must exceed vs. prior bar to be considered a “burst.” (Default: 1.618)


Plotted Items

  • Expected Volume (columns): Magenta columns projecting the full-bar volume from intrabar rate. Turns lime when a high expected-volume condition aligns with bullish bar structure; turns red under analogous bearish conditions.
  • Actual Volume (columns): Live volume columns, color-coded by state:
     • Blue = baseline;
     • Orange = “burst” (volume rising fast above prior × factor and above baseline);
     • Yellow = “burst at breakout” (burst + Stochastic volume breakout);
     • Light Blue = Stochastic breakout only.
  • Volume EMA (line): Yellow EMA for baseline comparison (default 14).


Calculations
  1. Compute elapsed time in the current bar (ms → seconds) and convert the current bar’s accumulated volume into a rate (volume per second).
  2. Project full-bar Expected Volume = (volume so far / seconds elapsed) × bar-seconds.
  3. Compute Volume EMA (default 14) for baseline; derive Stochastic(volume, length) and smoothed signal for momentum.
  4. Define “Burst” conditions:
     • Volume > prior volume × Volume Bar Increase Amount;
     • Volume > Minimum Volume;
     • Volume > Volume EMA;
     • Stochastic(volume) rising and/or above threshold.
  5. Classify “Burst at Breakout” when Burst aligns with Stochastic crossover above the Breakout Threshold.
  6. Classify Bullish/Bearish Expected Volume: if Expected Volume is ≥ 1.618 × prior bar volume and prior volume > Volume EMA, then:
     • Bullish if bar is green with a rising low;
     • Bearish if bar is red with a falling high.
  7. Color-map actual volume columns by state; overlay Expected Volume columns (magenta) and paint conditional overlays (lime/red) when directional context is detected.


How to Use
Spot the Surge Early
When Expected Volume spikes well above typical (and especially above ~1.618× the prior bar) before the bar closes, it often precedes a volatile move. Use this to prepare entries with tight, structure-based risk (e.g., just beyond the current bar’s wick) and asymmetric targets.

Confirm with Momentum
Yellow/orange volume columns indicate burst/breakout behavior in the live tape. When this aligns with a lime (bullish) or red (bearish) Expected Volume column, the probability of follow-through improves—particularly if aligned with prevailing trend or key levels.

Context Matters
Combine with your preferred S/R or structure tools (e.g., order blocks, channels, VWAP) to avoid chasing into obvious supply/demand. The projected surge can mark both continuations and sharp reversals depending on location and broader context.

Alerts
  • High Expected Volume – Bullish: When projected volume surges and the price action meets bullish conditions (green body with rising low).
  • High Expected Volume – Bearish: When projected volume surges and the price action meets bearish conditions (red body with falling high).


Other Usage Notes and Limitations
  • Projected volume depends on intrabar pace; abrupt pauses/flushes can change the projection quickly, especially on very small timeframes.
  • Minimum Volume and EMA baselines help filter thin markets; adjust upward on illiquid symbols to reduce noise.
  • A rising projection does not pick direction on its own—directional coloring (lime/red) requires price-action confirmation; otherwise treat magenta projections as “heads-up” only.
  • As with any single indicator, use within a broader plan (risk management, structure, confluence) to mitigate false positives and improve selectivity.


Inputs (Quick Reference)
  • Moving Average (int, default 14)
  • Stochastic Length (int, default 8)
  • Smoothing (int, default 3)
  • Stochastic Volume Breakout Threshold (int, default 20)
  • Volume Bar Increase Amount (float, default 1.618)
  • Minimum Volume (int, default 10,000)
  • Consecutive Volume Above 14 EMA (int, default 3)

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.