TV-1ndicators

Volume percentrank[TV1]

Volume percentrank
Volume normalized by percentile.

The indicator calculates the percentile of the trading volume . The volume in the base asset or quote asset can be selected as data. To calculate the volume of a quoted asset, the closing price or another standard method for calculating the price of a bar can be used.
A feature of percentile calculation with a small data sample length is low accuracy. Despite the fact that the script allows you to calculate a percentile with a length of 1, using a percentile length less than 100 is not recommended.
The percentile calculation method does not allow correctly calculating the percentile at the beginning of the chart due to the lack of all data in the selection, therefore, when the date of the first bar changes (this happens on small timeframes if the TradingView subscription does not allow you to see all historical data), the indicator will be repainted up to the bar number equal to the percentile sample length.
Huge values ​​of the percentile length may cause a script error. If the indicator doesn't work, just make the percentile length smaller.

Объем, нормализованный по процентилью.
Индикатор вычисляет процентиль объема торгов. В качестве данных может быть выбран объем в базовом(base) активе или котировочном(quote) активе. Для расчета объема в котировочном активе может использоваться цена закрытия либо другой стандартный метод расчета цены бара.
Особенностью расчета процентиля при малой длине выборки данных является малая точность. Не смотря на то, что скрипт позволяет вычиcлить процентиль с длинной 1, использовать длину процентиля меньше 100 не рекомендуется.
Метод расчета процентиля не позволяет корректно рассчитать процентиль в начале графика из-за отсутствия всех данных в выборке, поэтому при изменении даты первого бара (это происходит на малых таймфреймах, если подписка TradingView не позволяет видеть все исторические данные) индикатор подвержен перерисовке вплоть до номера бара равного длине выборки процентиля.
Большие значения длины процентиля могут приводить к ошибке скрипта. Если индикатор не работает, просто сделайте длину процентиля меньше.
Open-source script

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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?