OPEN-SOURCE SCRIPT
Relative Volume (RVOL) Percentile

Relative Volume (RVOL) Percentile
What it does
Relative Volume (RVOL) Percentile shows when participation on the current chart bar is unusual versus its own recent history. The pane displays a relative-volume histogram colored as Dry-up, Normal, High, or Extreme, with an optional norm line at 1.0x. It describes observed volume conditions only and does not generate directional trade signals.
How it works
The script compares each bar with a rolling sample of completed bars from the same chart timeframe. The current bar is excluded from both the baseline and percentile sample.
How to use it
Inputs
Signals and alerts
Repainting
The baseline and percentile sample use only prior chart bars. Alert transitions require the current chart bar to be confirmed, so an alert state is not finalized from an unfinished bar. The histogram can move with live volume while the current bar is open because it describes that still-forming bar; closed historical bars are not rewritten afterward.
Limitations
This script is a charting tool for educational purposes. It does not provide financial advice and does not predict future price movement. Trading carries risk; decisions and their outcome remain yours.
What it does
Relative Volume (RVOL) Percentile shows when participation on the current chart bar is unusual versus its own recent history. The pane displays a relative-volume histogram colored as Dry-up, Normal, High, or Extreme, with an optional norm line at 1.0x. It describes observed volume conditions only and does not generate directional trade signals.
How it works
The script compares each bar with a rolling sample of completed bars from the same chart timeframe. The current bar is excluded from both the baseline and percentile sample.
- The baseline is either the median or simple moving average of the previous Lookback bars.
- RVOL is current volume divided by that baseline. A value of 1.0 means current volume equals the selected norm.
- Percentile rank is the percentage of the previous Lookback volume values that are less than or equal to current volume.
- Dry-up is below the Dry-up threshold, Normal is below High, High is below Extreme, and Extreme is at or above the Extreme threshold.
How to use it
- Add the script to a chart and choose a Lookback that represents the recent activity you want to compare.
- Read bars near 1.0x as close to the selected volume norm, then use the stage color to judge how unusual that bar is within the recent sample.
- Use High or Extreme transitions to identify unusually active bars and Dry-up transitions to identify unusually quiet bars.
- Enable price-bar coloring or the last-bar RVOL label only when that extra context is useful.
Inputs
- Lookback (Bars) - Number of prior completed chart bars used for both the baseline and percentile sample. Range 2-1000, default 20.
- Baseline Method - Median reduces the influence of isolated spikes; SMA uses the arithmetic mean. Default Median.
- Dry-up Below (%) - Percentile below which volume is classified as Dry-up. Range 0-100, default 15.
- High From (%) - Percentile from which volume is classified as High. Range 0-100, default 80.
- Extreme From (%) - Percentile from which volume is classified as Extreme. Range 0-100, default 95. Thresholds must remain in ascending order.
- Show Histogram - Shows or hides the RVOL histogram. Default on.
- Show Reference Line (Norm) - Shows or hides the 1.0x norm line. Default on.
- Color Price Bars - Applies the same stage color to price bars on the main chart. Default off.
- Show Value Label - Shows the current RVOL value on the last bar only. Default off.
- Text Size - Numeric size for the optional last-bar label. Range 10-24, default 12.
- Opacity (%) - Controls visual opacity. Range 0-100, default 70.
- Dry-up / Normal / High / Extreme colors - Sets the four stage colors used by the histogram and optional price-bar coloring.
Signals and alerts
- Relative Volume - Extreme - fires on a confirmed bar when the stage newly becomes Extreme.
- Relative Volume - High - fires on a confirmed bar when the stage crosses from below High into High or Extreme.
- Relative Volume - Dry-up - fires on a confirmed bar when the stage newly becomes Dry-up.
Repainting
The baseline and percentile sample use only prior chart bars. Alert transitions require the current chart bar to be confirmed, so an alert state is not finalized from an unfinished bar. The histogram can move with live volume while the current bar is open because it describes that still-forming bar; closed historical bars are not rewritten afterward.
Limitations
- The script uses total chart-bar volume only. It does not estimate buy/sell delta, footprint data, or intrabar order flow.
- Percentile rank is relative to the chosen Lookback, so different sample lengths can classify the same bar differently.
- Markets or symbols with missing, sparse, or non-comparable volume data can produce incomplete or less useful readings.
- The script measures volume anomaly only. It does not predict direction, continuation, reversal, or future price movement.
This script is a charting tool for educational purposes. It does not provide financial advice and does not predict future price movement. Trading carries risk; decisions and their outcome remain yours.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Find my advanced premium indicators:
kronosindicators.com
kronosindicators.com
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Find my advanced premium indicators:
kronosindicators.com
kronosindicators.com
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.