OPEN-SOURCE SCRIPT

Relative Volume Context [Alturoi]

50
Relative Volume Context is an advanced volume analysis indicator designed to help traders understand whether current volume is truly unusual—or simply normal for that moment in time.

Unlike traditional volume or basic relative volume tools, this indicator models expected volume based on historical time-based behavior (minutes, hours, days, sessions) and compares it directly to what is happening now.

The result is clear, structured insight into:
  • Unusual participation
  • Abnormal activity
  • Quiet vs active market conditions
  • When volume confirms price—and when it doesn’t

This tool is built for day traders and swing traders who want volume context, not just volume bars.

📌 What Problem This Indicator Solves

Raw volume is deceptive.

High volume at the open, low volume at lunch, and rising volume into the close are normal market behaviors—yet most indicators treat them as equal.

Relative Volume Context fixes this by asking a better question:

“Is today’s volume high or low compared to what normally happens at this exact time?”


By conditioning volume expectations on time and session structure, the indicator filters out noise and highlights moments where participation genuinely deviates from the norm.

🧩 How Relative Volume Context Works (Conceptually)

At its core, the indicator compares:
  • Actual Volume
  • Expected Volume for this time bucket


A time bucket can include combinations such as:
  • Minute of the hour
  • Hour of the trading day
  • Day of the week or month
  • Broader calendar structure (months / quarters)


Expected volume is calculated using historical data for that same bucket, creating a fair, apples-to-apples comparison.

This produces several meaningful outputs:
  • Expected Volume: the typical volume level for the current time context.
  • Difference: actual minus expected.
  • Surprise (%): a normalized measure of how large the deviation is relative to expectation.
  • Z-Score (Mean mode): a statistical measure of how extreme current volume is compared to its historical distribution.
  • Sample Size & Confidence: transparency into how much historical data supports the expectation.


🧠 Built for Clarity and Performance

  • Efficient data handling for intraday charts
  • Adaptive period selection (Auto Selection)
  • Optional forecast of expected future volume
  • Clean HUD showing context, confidence, and interpretation


🛠 How to Use It (Best Practices)

  1. Use it with price, not instead of price.
  2. Treat high readings as context, not automatic signals.
  3. Combine with structure, levels, and market conditions.
  4. Pay attention to Confidence / N before trusting extreme readings.
  5. Avoid over-interpreting early history with low sample sizes.


👥 Who This Indicator Is For

  • Day traders trading U.S. equities
  • Swing traders monitoring participation and follow-through
  • Traders who value context over hype
  • Users who want transparency, not black-box signals


Subscribe to Alturoi’s private, invite-only indicators designed to support informed trading decisions.

Volume is most powerful when it explains why price is moving—not when it’s used in isolation.

📊 Understanding the HUD: What Each Metric Actually Means
The HUD is designed to answer one core question:

“Is this volume unusual in a way I should care about?”


Raw volume on its own is misleading. Each field in the HUD exists to remove a specific form of self‑deception and replace it with context you can reason about.

🧭 Bucket — Unusual compared to when?

Volume has a strong time structure. A spike at 9:31 AM means nothing unless it’s compared to other 9:31 AM bars — not lunch hours, not overnight, not Fridays.

The bucket defines the comparison group:
  • Same minute of the hour
  • Same hour of the day
  • Same day of the week, month, or quarter


Without this, expected volume becomes a global average — statistically wrong and operationally misleading.

⚙️ Method (Mean vs Percentile) — What kind of “normal” am I using?

Different methods answer different trading questions:
  • Mean: fast, stable, symmetric, and enables Z‑scores. Best when volume distributions are smooth.
  • Percentile: robust to outliers and news spikes. Answers how rare this volume is historically.


Mean measures deviation from equilibrium. Percentile measures rarity. If you don’t know the method, you can’t interpret the signal correctly.

🔢 N (Sample Size) — Is this statistic even trustworthy?

Statistics without sample size are vibes.
  • N = 12 → noise dressed as math
  • N = 200 → structure


Two identical surprise readings with different N values are not the same signal. This single number prevents false confidence.

📐 Confidence — How much weight should I give this?

Confidence is a human‑readable compression of N:

  • Low → exploratory only
  • Medium → usable with context
  • High → structurally reliable


This isn’t judgment — it’s statistical humility.

📊 Expected — Expected relative to what baseline?

Expected volume is the anchor of everything else.

Without seeing it:
  • You can’t tell whether surprise comes from a low or high base
  • You can’t sanity‑check the model


If Expected looks wrong, the signal is wrong — full stop.

Surprise (%) — How large is the deviation in practical terms?

Raw differences don’t scale. Surprise % normalizes across symbols, timeframes, and regimes.

A +80% surprise on SPY at 10:15 matters. A +5% surprise usually doesn’t. This is the actionability metric.

📐 Z‑Score — Is this statistically extreme or just mildly off?

Z‑score adds distribution context:
  • 0.5σ → normal fluctuation
  • 2σ → uncommon
  • 3σ → rare, regime‑relevant


Two bars can share the same % surprise but have very different Z‑scores if volatility differs. Z tells you whether the market itself considers this bar “weird.”

The deeper point

Most volume indicators stop at: “Volume is high.”

Relative Volume Context forces the harder, more honest question:

“High compared to what, how rare, and how reliable is that comparison?”


That’s the difference between decorative indicators and decision‑support instruments.

🔍 Why This Matters for Day & Swing Traders

Relative Volume Context is not a signal generator. It is a decision-support tool.

Practical uses include:
  • Identifying unusual participation during breakouts or breakdowns
  • Distinguishing real interest from routine session volume
  • Avoiding false confidence in moves occurring on “normal” volume
  • Spotting regime shifts or news reactions (participation shocks)
  • Understanding when low volume truly signals lack of interest


Used correctly, it helps traders answer:

“Is this move being supported by abnormal activity, or is it just time-of-day noise?”


Disclaimer: This indicator is provided for educational and informational purposes only and does not constitute financial or investment advice. Trading involves risk, and past market behavior does not guarantee future results. Always use proper risk management and independent judgment.

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.