OPEN-SOURCE SCRIPT
Volume Activity Suite

A daily-stock panel that answers one question from several angles: is trading participation right now unusually high, normal, or unusually low relative to this stock's own recent history, and what does that imply when read together with price?
Volume is right-skewed and heavy-tailed, so comparing today's volume to a simple average is easily distorted by a few spike days. This tool handles that with a log transform, a baseline taken over the window up to the previous bar, and distribution-free ranking, and it adds a few refinements drawn from the abnormal-volume and market-microstructure literature.
Metrics. All are computed every bar. The pane plots the one you select in Display, and the table shows them together.
Log Z is the z-score of log volume over a rolling baseline. Because log volume is close to normal in its bulk, the z-score reads as how many standard deviations the current volume sits from its usual level. The zero line is the normal level, the green line marks the high threshold, and the red line marks the low threshold.
Percentile is the rank of today's volume within the lookback window. It assumes nothing about the distribution, so it is the most robust to fat tails and the most sensitive to quiet periods.
RVOL is classic relative volume: today's volume divided by the prior-window average.
PVO is the Percentage Volume Oscillator, the MACD calculation applied to volume. It reads whether the volume regime is expanding or shrinking rather than its level.
Bias combines activity with price direction into an accumulation, distribution, or quiet read.
Range and Flow add a volume-versus-range view based on the Mixture of Distributions Hypothesis, under which volume and price movement are jointly driven by information arrival. Range is the z-score of the day's true range. Flow labels a high-volume day as Conviction when the range is also wide, or Churn when the range is narrow.
Options.
Volume basis can be raw share volume or turnover, shares traded relative to shares outstanding, following the log relative-volume approach used in volume event studies. Turnover normalizes for share-count changes and falls back to share volume when the data is unavailable.
Robust z-score replaces mean and standard deviation with median and MAD, so that a few extreme days do not distort the baseline.
Market-adjust subtracts a market symbol's log-volume z from the stock's, isolating stock-specific volume from days when the whole market trades heavily.
Reading it. The columns show where the day sits versus its own history. Colored bars flag the days where real participation entered, while ordinary days stay gray. Because volume measures participation rather than direction, read the panel alongside price: high volume on an up day is accumulation-like, high volume on a down day is distribution-like, and a decline on drying-up volume is drift rather than heavy selling.
Notes and limits. This is a descriptive context tool, not a buy or sell signal. Volume does not predict direction, and the accumulation, distribution, conviction, and churn labels are heuristics rather than conclusions. Everything is measured relative to the stock's own recent window, so regime shifts and the usual heavy-tail caveats apply. Nothing here is financial advice.
Volume is right-skewed and heavy-tailed, so comparing today's volume to a simple average is easily distorted by a few spike days. This tool handles that with a log transform, a baseline taken over the window up to the previous bar, and distribution-free ranking, and it adds a few refinements drawn from the abnormal-volume and market-microstructure literature.
Metrics. All are computed every bar. The pane plots the one you select in Display, and the table shows them together.
Log Z is the z-score of log volume over a rolling baseline. Because log volume is close to normal in its bulk, the z-score reads as how many standard deviations the current volume sits from its usual level. The zero line is the normal level, the green line marks the high threshold, and the red line marks the low threshold.
Percentile is the rank of today's volume within the lookback window. It assumes nothing about the distribution, so it is the most robust to fat tails and the most sensitive to quiet periods.
RVOL is classic relative volume: today's volume divided by the prior-window average.
PVO is the Percentage Volume Oscillator, the MACD calculation applied to volume. It reads whether the volume regime is expanding or shrinking rather than its level.
Bias combines activity with price direction into an accumulation, distribution, or quiet read.
Range and Flow add a volume-versus-range view based on the Mixture of Distributions Hypothesis, under which volume and price movement are jointly driven by information arrival. Range is the z-score of the day's true range. Flow labels a high-volume day as Conviction when the range is also wide, or Churn when the range is narrow.
Options.
Volume basis can be raw share volume or turnover, shares traded relative to shares outstanding, following the log relative-volume approach used in volume event studies. Turnover normalizes for share-count changes and falls back to share volume when the data is unavailable.
Robust z-score replaces mean and standard deviation with median and MAD, so that a few extreme days do not distort the baseline.
Market-adjust subtracts a market symbol's log-volume z from the stock's, isolating stock-specific volume from days when the whole market trades heavily.
Reading it. The columns show where the day sits versus its own history. Colored bars flag the days where real participation entered, while ordinary days stay gray. Because volume measures participation rather than direction, read the panel alongside price: high volume on an up day is accumulation-like, high volume on a down day is distribution-like, and a decline on drying-up volume is drift rather than heavy selling.
Notes and limits. This is a descriptive context tool, not a buy or sell signal. Volume does not predict direction, and the accumulation, distribution, conviction, and churn labels are heuristics rather than conclusions. Everything is measured relative to the stock's own recent window, so regime shifts and the usual heavy-tail caveats apply. Nothing here is financial advice.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.