Relative Volume consists of Volume divided by Average Volume where Average Volume is a Simple Moving Average, calculated on the basis of the past 10 periods (not taking into account the current volume bar).
Relative Volume = volume / average volume.
Here's the script that allows you to plot Relative Volume on your chart:
//@version=4 study("RelVol") AvgVol = sma(volume,10) plot(volume/AvgVol, title="Relative Volume")
It takes the last 10 bars and makes an SMA, and then divides the volume by this SMA to calculate Relative Volume.
Relative Volume is calculated on any available time interval, the list of which you may see clicking the Time Interval button at the top of the screener. This means that when you change the interval, Relative Volume is recalculated.
Relative Volume is not calculated during Extended hours, only during regular trading sessions.