Lookback 20 days.
Historical and average values are used to formulate the ratio.
Thank you to R4Rocket for the initial code.
I also researched the RVOL output in Trade Ideas to align the final ratio as close as possible.
The colors change at different levels:
<0.5 ; Red
0.5 > and <=.65 ; Orange
0.65 > and <=1 ; Dark Yellow
1 > and <=1.25 ; Bright Yellow
1.25 < and <=1.5 ; Dark Green
1.5 < and <=2 ; Brighter Green
Above 2 ; Very Bright Green
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.