How is this Rvol version different from Std variation that is stock in TOS platform or how different it calculates the Rvol?
The below code and the ToS standard deviation of volume to average volume ratio
RelativeVolumeStDev()
https://toslc.thinkorswim.com/cente...ators/studies-library/R-S/RelativeVolumeStDev
Bother use the volume to average volume ratio (relative volume)
But the below code uses the higher timeframe (daily) average volume (which repaints on interday charts)
to calculate the volume to average volume ratio (relative volume)
Code:#Relavitve Volume # Code def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1]; def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD()); def vol = if isRollover and beforeStart then volume else if beforeStart then vol[1] + volume else Double.NaN; def PMV = if IsNaN(vol) then PMV[1] else vol; def AV = AggregationPeriod.DAY; def x = Average(Volume(period=AV)[1],50); def y1 = Round((PMV/x),2); def L = Lg(y1); def p = if L>=1 then 0 else if L>=0 then 1 else 2; def y2 = Round(y1,p); plot z = y2; AssignBackgroundColor(if z > 11 then Color.Cyan else if z > 6 then Color.Green else if z > 4 then Color.LIME else if z > 3 then Color.Yellow else if z > 2 then Color.Pink else if z < 1 then Color.RED else Color.LIGHT_GRAY); AddLabel(yes, AsText(z, NumberFormat.TWO_DECIMAL_PLACES) + "x", Color.Black); #end Code