KPV by Killpips

Main Code Logic:
Historical Volatility (hvv):
The fHV function is called to calculate the volatility for the logarithmic volume values.
Volume Percentile (hvvp):
The fHVP function calculates the volume percentile based on the calculated historical volatility (hvv).
Percentile Ranks:
prv: The percentile rank of the volume percentile (hvvp) over the last avg periods (to represent the average volume percentile).
prv_1week: The percentile rank of the volume percentile over the last 5 times the avg period (to represent the weekly volume percentile, assuming 5 trading days in a week).
prv_1month: The percentile rank of the volume percentile over the last 22 times the avg period (to represent the monthly volume percentile, assuming 22 trading days in a month).
Volume Percentile Histogram (VV):
The VV variable represents the current value of the volume percentile (hvvp), which is plotted as a histogram. The color of the bars changes depending on the value of VV:
Maroon if above 90
Orange if between 80 and 90
Yellow if between 71 and 79
Green if between 50 and 70
Blu if between 49 and 31
Gray if below 30
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact killpips directly.
Note that this private, invite-only script has not been reviewed by script moderators, and its compliance with House Rules is undetermined. TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
Warning: please read our guide for invite-only scripts before requesting access.
Disclaimer
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact killpips directly.
Note that this private, invite-only script has not been reviewed by script moderators, and its compliance with House Rules is undetermined. TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
Warning: please read our guide for invite-only scripts before requesting access.