# Volume True Range (VTR) and Volume Average True Range (VATR)

This indicator uses lower-timeframe cumulative volume delta (CVD) candles to calculate the Volume True Range (VTR) of your instrument. The VTR is calculated similarly to the traditional true range, but uses volume instead (no price is involved in the calculation other than in the lower timeframe bar delta assignments). I haven't seen this concept developed before on TradingView or frankly the Internet, but I thought it seemed fairly intuitive; we can calculate the lower timeframe volume delta candles, so it makes sense to calculate a volume true range, which could show divergences in volume and price.

The VTR is calculated by the following code which uses the lower-timeframe CVD candles:
`volumeTR = math.max(cvd_high - cvd_low, math.abs(cvd_high - nz(cvd_close[1])), math.abs(cvd_low - nz(cvd_close[1])))`

The Volume Average True Range (VATR) is calculated by taking the RMA of the VTR, similarly to the ATR.

I would like to thank TradingView for the calculation of up/down intrabar volumes, which I referenced from their 'CVD - Cumulative Volume Delta Candles' indicator.

How to Use
The VTR and VATR can be used to identify price-volume trends and volatility divergences. A strong VTR (above the VATR of your specified length) can indicate the start or continuation of a trend, which you can identify via the VTR color (determined via price candle colors). Similarly, a rising VATR with most VTR bars of a specific color (green or red) will show that volume is moving in a specific price direction.

Additionally, the VATR plotted next to the ATR of the same length will show you volume volatility divergences. A strong VATR next to a muted/flat ATR indicates strong volume movement, which price might follow in the upcoming bars. Or, for trend reversals, a decreasing ATR after a strong trend combined with a rising VATR of the opposite trend may show a possible reversal.

Hope you all enjoy this.
-wbburgin

* Quick note: lower timeframe analysis returns only so much data. If you are on a high timeframe and the indicator is showing only a limited amount of bars, raise the lower timeframe (but still keep it below your current timeframe) so that the arrays can return more bars for you.

FAQ: I am gradually phasing out my Patreon because of the time it takes to maintain.

Test my strategies on CryptoRobotics: cryptorobotics.co/?trade=f23b09
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?