OPEN-SOURCE SCRIPT
Range-Weighted Volatility (Comparable)

I wrote an indicator to measure volatility inside a range. It’s extremely useful for choosing a trading pair for grid strategies, because it lets you quickly, easily, and fairly identify which asset is the volatility leader. It measures volatility “fairly” relative to the asset’s trading range, not just by absolute price changes.
For example: if an asset trades in a 50–100 range and over a week it moves many, many times between 52 and 98, then it’s highly volatile. But if another asset trades in a 50–1000 range and makes the same 52–98 moves, its volatility is actually low — because the “weight” of that movement relative to the full range is small. The indicator accounts for this “movement weight” relative to the range, then sums these weights into a single number. That number makes it easy to judge whether an asset is suitable for a grid strategy.
That’s exactly what grids need: not just high volatility, but high volatility within a narrow range.
Settings: the Window (bars) field defines how many bars are used to calculate volatility. On a 5-minute chart, one week is 2016 bars (2460/57). By default, the script calculates over 30 days on 5-minute charts. The script also allows you to set a second symbol for comparison, so you can see both results on the same chart.
Написал индикатор для определения волатильности в диапазоне, очень-очень полезно для выбора торговой пары на гриде, позволяет легко и быстро и честно определить лидера по волатильности, при этом определяет ее "честно", относительно торгового диапазона, а не просто изменения цены.
Например если актив торгуется в диапазоне 50-100 и за неделю много-много раз сходил 52-98, то это очень волатильный актив, и в то же время если актив торгуется в диапазоне 50-1000 и сходил так же 52-98, то это будет низко волатильный актив, т.е. учитывается "вес" движения относительно диапазона и данные "веса" суммируются в одну единую цифру по которой и можно оценивать насколько актив подходит под грид стратегию.
А ведь именно это для гридов и нужно, не просто высокая волатильность, а именно высокая волатильность в узком диапазоне.
Касательно настроек , в поле Windows (bars) задается количество баров по которым скрипт будет считать волатильность, на 5-ти минутки неделя это 2016 (24*60/5*7), стандартно скрипт считает за 30 дней на 5-ти минутки. + в самом скрипте можно указать вторую пару для сравнения чтоб на одном графике увидеть результат.
For example: if an asset trades in a 50–100 range and over a week it moves many, many times between 52 and 98, then it’s highly volatile. But if another asset trades in a 50–1000 range and makes the same 52–98 moves, its volatility is actually low — because the “weight” of that movement relative to the full range is small. The indicator accounts for this “movement weight” relative to the range, then sums these weights into a single number. That number makes it easy to judge whether an asset is suitable for a grid strategy.
That’s exactly what grids need: not just high volatility, but high volatility within a narrow range.
Settings: the Window (bars) field defines how many bars are used to calculate volatility. On a 5-minute chart, one week is 2016 bars (2460/57). By default, the script calculates over 30 days on 5-minute charts. The script also allows you to set a second symbol for comparison, so you can see both results on the same chart.
Написал индикатор для определения волатильности в диапазоне, очень-очень полезно для выбора торговой пары на гриде, позволяет легко и быстро и честно определить лидера по волатильности, при этом определяет ее "честно", относительно торгового диапазона, а не просто изменения цены.
Например если актив торгуется в диапазоне 50-100 и за неделю много-много раз сходил 52-98, то это очень волатильный актив, и в то же время если актив торгуется в диапазоне 50-1000 и сходил так же 52-98, то это будет низко волатильный актив, т.е. учитывается "вес" движения относительно диапазона и данные "веса" суммируются в одну единую цифру по которой и можно оценивать насколько актив подходит под грид стратегию.
А ведь именно это для гридов и нужно, не просто высокая волатильность, а именно высокая волатильность в узком диапазоне.
Касательно настроек , в поле Windows (bars) задается количество баров по которым скрипт будет считать волатильность, на 5-ти минутки неделя это 2016 (24*60/5*7), стандартно скрипт считает за 30 дней на 5-ти минутки. + в самом скрипте можно указать вторую пару для сравнения чтоб на одном графике увидеть результат.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.