Обновлено
Time-of-day volume normalizer

High volume at 9:31 is not high volume. See each bar against its own time of day.
Description
Raw volume is not comparable across the trading day. The first minutes of the regular session routinely print several times the volume of a midday bar, so reading "high volume" off the raw histogram usually just tells you that it is early in the session. Most relative volume tools compare a bar against a trailing average of the last N bars regardless of clock time, which carries the same problem forward.
This compares each bar's volume only against the same clock time on prior sessions, and returns the result as a z-score.
How it calculates
Every bar is assigned to a time slot from its minute of the day, in the time zone you choose, and the chart timeframe. Each slot keeps an independent rolling history of volume, one observation per prior session. For the current bar the script reads that slot's cached center and spread and returns how far current volume sits from the center in spread units. The cache is refreshed only when the slot receives a new observation, so the current bar is never part of its own baseline. Median with median absolute deviation, scaled by 1.4826, is the default. Mean with population standard deviation is the alternative.
How to read it
A reading of 0 means this bar is doing what this time of day normally does. A reading of +2 means it is two spread units above its own slot's history. Green marks readings above the norm, amber marks unusually high, and a lighter grey marks unusually quiet. The pane shades faintly while a slot is still warming or has no spread. The table shows the current slot, its warmup state, its norm, and the current reading.
Repainting
Closed bars do not repaint. The live bar updates until it closes. History is written on confirmed bars only.
Originality and attribution
The z-score is textbook. What is original here is the slot-keyed baseline: one independent rolling history per minute-of-day bucket, with the current bar excluded from its own baseline, and per-slot statistics cached and recomputed only when that slot's history changes. This is not derived from and does not reuse code from any existing published script.
Honest limitations
Nothing plots until a slot reaches the minimum sample count. The table reports warmup progress.
If a slot's stored volumes are near-identical the spread collapses to zero and no z-score is defined. The table reports this as flat.
Half days, holidays, and session changes pollute a slot's history.
Futures roll and contract changes shift volume levels.
Slots and the session filter both key to the time zone you choose.
Requires an intraday timeframe of 1 minute or higher and a symbol that reports volume.
This is not a signal, it says nothing about direction, and a high reading is not inherently bullish or bearish.
Description
Raw volume is not comparable across the trading day. The first minutes of the regular session routinely print several times the volume of a midday bar, so reading "high volume" off the raw histogram usually just tells you that it is early in the session. Most relative volume tools compare a bar against a trailing average of the last N bars regardless of clock time, which carries the same problem forward.
This compares each bar's volume only against the same clock time on prior sessions, and returns the result as a z-score.
How it calculates
Every bar is assigned to a time slot from its minute of the day, in the time zone you choose, and the chart timeframe. Each slot keeps an independent rolling history of volume, one observation per prior session. For the current bar the script reads that slot's cached center and spread and returns how far current volume sits from the center in spread units. The cache is refreshed only when the slot receives a new observation, so the current bar is never part of its own baseline. Median with median absolute deviation, scaled by 1.4826, is the default. Mean with population standard deviation is the alternative.
How to read it
A reading of 0 means this bar is doing what this time of day normally does. A reading of +2 means it is two spread units above its own slot's history. Green marks readings above the norm, amber marks unusually high, and a lighter grey marks unusually quiet. The pane shades faintly while a slot is still warming or has no spread. The table shows the current slot, its warmup state, its norm, and the current reading.
Repainting
Closed bars do not repaint. The live bar updates until it closes. History is written on confirmed bars only.
Originality and attribution
The z-score is textbook. What is original here is the slot-keyed baseline: one independent rolling history per minute-of-day bucket, with the current bar excluded from its own baseline, and per-slot statistics cached and recomputed only when that slot's history changes. This is not derived from and does not reuse code from any existing published script.
Honest limitations
Nothing plots until a slot reaches the minimum sample count. The table reports warmup progress.
If a slot's stored volumes are near-identical the spread collapses to zero and no z-score is defined. The table reports this as flat.
Half days, holidays, and session changes pollute a slot's history.
Futures roll and contract changes shift volume levels.
Slots and the session filter both key to the time zone you choose.
Requires an intraday timeframe of 1 minute or higher and a symbol that reports volume.
This is not a signal, it says nothing about direction, and a high reading is not inherently bullish or bearish.
Информация о релизе
Display only. No change to how anything is calculated.Readings now show a leading zero, so a value below one reads as 0.85 rather than .85.
Table text is larger and easier to read at normal chart zoom.
Информация о релизе
Substantial rewrite. Readings will differ from the previous version.What changed in the calculation:
Sessions are now committed atomically. A session enters history only when every expected time slot is present, so half days, early closes, partial first days, and data gaps are excluded from every slot together instead of polluting some slots and not others. Previously each slot kept its own history, which meant the 10:00 baseline could silently represent different dates from the 14:00 baseline.
Volume is modeled on a log scale by default, which reduces the positive skew and the scale shock that contract rolls introduce. Raw volume remains available as an explicit option.
When median absolute deviation collapses to zero on a discrete or quiet symbol, the estimator now falls back to the interquartile range divided by 1.349 instead of reporting no result.
Excluded-session count is now reported, so you can see how much history was rejected rather than wondering.
What was added:
Same-slot RVOL, the current bar against the slot's historical median.
Same-slot percentile, the mid-rank of current volume within that slot.
The historical interquartile range for the slot, in raw volume.
A visual cap on the plotted column so one extreme reading cannot flatten the pane. The table, the Data Window, and alerts all keep the uncapped value, and the table says when the plot is capped.
Confirmed-bar alerts on unusually high and unusually low slot volume.
The table now labels whether the current reading is confirmed or provisional.
Requirements:
Intraday, whole-minute timeframes. The timeframe must divide the session start and length exactly. For a 09:30 to 16:00 session that is 1, 2, 3, 5, 6, 10, 15, or 30 minutes; a session starting on the hour also accepts 20 and 60.
Time slots multiplied by rolling sessions is capped at 25,000 to protect execution time. A 390-minute session on 1 minute supports 60 rolling sessions; on 5 minutes it supports the full 250.
Still true, and still the point: this describes participation, not direction. High volume is not bullish and low volume is not bearish.
Информация о релизе
Relative volume can now display when past volumes for the same time slot have zero spread. The bar must be in session, report a volume and have enough matching history with a positive median. The z score still needs a positive spread.The SPY chart shows a slot with measurable spread. At 15:55 New York time, volume was 5.77 times the median for that time slot.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.