OPEN-SOURCE SCRIPT
Rolling Volume Delta

█ OVERVIEW
Rolling Volume Delta (RVD) estimates net buying vs. selling pressure per bar, then weights that pressure by how much price actually moved — so a strong directional bar counts for more than a quiet, indecisive one. The result is summed over a rolling window, smoothed, and normalized against total volume so it reads consistently across different instruments and volume regimes.
█ CONCEPT
Most volume delta tools estimate buy/sell pressure and stop there. RVD adds one more step: it multiplies each bar's estimated delta by the magnitude of that bar's price change. The logic is that a bar where buyers dominate AND price actually moved higher represents more conviction than a bar with the same buy/sell split during a flat, choppy stretch. That weighted delta is then summed over a rolling window and smoothed, so the final line reflects sustained pressure rather than single-bar noise.
█ HOW IT WORKS
1. Buy/sell split: each bar's volume is divided between buy and sell based on where the close landed within that bar's high-low range (close near the high = buy-weighted, close near the low = sell-weighted).
2. Price weighting: that delta is multiplied by the percentage price change over a configurable lookback, so bars with bigger moves are weighted more heavily.
3. Rolling sum: the weighted delta is summed over a configurable lookback window.
4. Smoothing: an EMA is applied to reduce noise.
5. Normalization: the smoothed result is divided by total volume over the same window and expressed as a percentage, keeping the scale comparable across tickers and sessions.
█ HOW IT DIFFERS FROM OTHER VOLUME DELTA SCRIPTS
Other delta oscillators calculate buy/sell pressure and smooth it directly. RVD's price-weighting step means the indicator isn't just "how much delta happened" but "how much delta happened relative to how much the market actually moved" — filtering out high-volume, low-conviction chop from the signal.
█ SETTINGS
- Lookback Length — bars summed together for the rolling delta. Longer = smoother, slower.
- Smoothing — EMA length applied to the rolling sum.
- Momentum Lookback — bars back used to measure price change for weighting. Higher values emphasize sustained moves over single-bar spikes.
As bars carry more information on their own (higher timeframes), less summing and smoothing is needed for a clean read. Within any timeframe, trending conditions benefit from longer/smoother settings that confirm sustained pressure and filter chop, while ranging conditions benefit from shorter/quicker settings that catch reversals near the extremes at the cost of more false flips in the middle of the range.
Suggested starting points:
Timeframe | Condition | Length | Smoothing | Momentum Lookback
5-30 min | Trend / Price Discovery | 14-20 | 3-5 | 1-2
5-30 min | Range / Accumulation | 8-10 | 1-2 | 1
1-4 hour | Trend / Price Discovery | 10-14 | 2-3 | 2-4
1-4 hour | Range / Accumulation | 6-8 | 1-2 | 1-2
Daily+ | Trend / Price Discovery | 8-10 | 2 | 3-5
Daily+ | Range / Accumulation | 5-6 | 1 | 2
These are included in each input's tooltip in the settings popup as well.
█ NOTES
This is a volume-estimation tool based on standard OHLCV data (bar range and close position), not true tick-level buy/sell data — most retail data feeds don't provide that, so this is the same practical tradeoff most public volume delta scripts make. It's intended as a context tool for reading order flow alongside price action, not a standalone signal generator.
This publication is for educational purposes only and does not constitute financial advice. Past performance and visual patterns do not guarantee future results.
Rolling Volume Delta (RVD) estimates net buying vs. selling pressure per bar, then weights that pressure by how much price actually moved — so a strong directional bar counts for more than a quiet, indecisive one. The result is summed over a rolling window, smoothed, and normalized against total volume so it reads consistently across different instruments and volume regimes.
█ CONCEPT
Most volume delta tools estimate buy/sell pressure and stop there. RVD adds one more step: it multiplies each bar's estimated delta by the magnitude of that bar's price change. The logic is that a bar where buyers dominate AND price actually moved higher represents more conviction than a bar with the same buy/sell split during a flat, choppy stretch. That weighted delta is then summed over a rolling window and smoothed, so the final line reflects sustained pressure rather than single-bar noise.
█ HOW IT WORKS
1. Buy/sell split: each bar's volume is divided between buy and sell based on where the close landed within that bar's high-low range (close near the high = buy-weighted, close near the low = sell-weighted).
2. Price weighting: that delta is multiplied by the percentage price change over a configurable lookback, so bars with bigger moves are weighted more heavily.
3. Rolling sum: the weighted delta is summed over a configurable lookback window.
4. Smoothing: an EMA is applied to reduce noise.
5. Normalization: the smoothed result is divided by total volume over the same window and expressed as a percentage, keeping the scale comparable across tickers and sessions.
█ HOW IT DIFFERS FROM OTHER VOLUME DELTA SCRIPTS
Other delta oscillators calculate buy/sell pressure and smooth it directly. RVD's price-weighting step means the indicator isn't just "how much delta happened" but "how much delta happened relative to how much the market actually moved" — filtering out high-volume, low-conviction chop from the signal.
█ SETTINGS
- Lookback Length — bars summed together for the rolling delta. Longer = smoother, slower.
- Smoothing — EMA length applied to the rolling sum.
- Momentum Lookback — bars back used to measure price change for weighting. Higher values emphasize sustained moves over single-bar spikes.
As bars carry more information on their own (higher timeframes), less summing and smoothing is needed for a clean read. Within any timeframe, trending conditions benefit from longer/smoother settings that confirm sustained pressure and filter chop, while ranging conditions benefit from shorter/quicker settings that catch reversals near the extremes at the cost of more false flips in the middle of the range.
Suggested starting points:
Timeframe | Condition | Length | Smoothing | Momentum Lookback
5-30 min | Trend / Price Discovery | 14-20 | 3-5 | 1-2
5-30 min | Range / Accumulation | 8-10 | 1-2 | 1
1-4 hour | Trend / Price Discovery | 10-14 | 2-3 | 2-4
1-4 hour | Range / Accumulation | 6-8 | 1-2 | 1-2
Daily+ | Trend / Price Discovery | 8-10 | 2 | 3-5
Daily+ | Range / Accumulation | 5-6 | 1 | 2
These are included in each input's tooltip in the settings popup as well.
█ NOTES
This is a volume-estimation tool based on standard OHLCV data (bar range and close position), not true tick-level buy/sell data — most retail data feeds don't provide that, so this is the same practical tradeoff most public volume delta scripts make. It's intended as a context tool for reading order flow alongside price action, not a standalone signal generator.
This publication is for educational purposes only and does not constitute financial advice. Past performance and visual patterns do not guarantee future results.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。