OPEN-SOURCE SCRIPT
ATR/DTR[jackieee]

Description
This indicator compares the current range (DTR) with the Average True Range (ATR) of a selected timeframe and displays the result in a compact table on the chart. Its purpose is to show how much of the market’s “normal” move has already been used.
The logic is straightforward: ATR measures the average volatility over time, while DTR measures the actual high-to-low range of the current bar on the chosen timeframe. The script then calculates DTR / ATR × 100, which shows the current range as a percentage of ATR. This makes it easy to judge whether price is moving within a normal range, approaching an average full move, or already extending beyond it.
A custom threshold can also be set so the table changes color once the current range reaches a chosen percentage of ATR. This helps highlight when volatility is becoming unusually large and can be useful for intraday awareness, range expansion analysis, and managing expectations after a strong move.
This indicator compares the current range (DTR) with the Average True Range (ATR) of a selected timeframe and displays the result in a compact table on the chart. Its purpose is to show how much of the market’s “normal” move has already been used.
The logic is straightforward: ATR measures the average volatility over time, while DTR measures the actual high-to-low range of the current bar on the chosen timeframe. The script then calculates DTR / ATR × 100, which shows the current range as a percentage of ATR. This makes it easy to judge whether price is moving within a normal range, approaching an average full move, or already extending beyond it.
A custom threshold can also be set so the table changes color once the current range reaches a chosen percentage of ATR. This helps highlight when volatility is becoming unusually large and can be useful for intraday awareness, range expansion analysis, and managing expectations after a strong move.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.