OPEN-SOURCE SCRIPT

ATR/DTR with Custom Percentage Display

This Pine Script indicator provides a detailed view of the Average True Range (ATR) and Daily True Range (DTR), along with additional calculated metrics to assist in analyzing price volatility. The key features of the indicator include:

ATR Calculation:

The ATR is calculated over a user-defined timeframe, allowing traders to assess average market volatility over a specific period.
DTR Calculation:

The DTR represents the absolute range (high - low) of the current or chosen timeframe, providing insights into the day's price movement.
ATR/DTR Percentage:

This metric calculates the DTR as a percentage of the ATR, showing how the daily range compares to the average range, with dynamic coloring to highlight when it exceeds a user-defined threshold.
Custom Percentage of ATR:

Users can input a custom percentage to calculate and display a corresponding value of the ATR. For example, entering 15% will compute and display 15% of the ATR in the indicator’s table.
Dynamic Table Display:

The indicator outputs all these metrics in a well-organized table that is overlaid on the chart. The table includes:
ATR
DTR
ATR/DTR percentage
The user-defined percentage of ATR
Customizable Features:

Color Coding: The table dynamically changes its background color when the ATR/DTR percentage exceeds a user-defined threshold.
Placement Options: The table's position on the chart can be adjusted (e.g., bottom-right, top-center) for optimal visibility.
Use Case:
This indicator is ideal for traders who want a deeper understanding of market volatility and prefer visual representation of how current price movements compare to historical averages. It is especially useful for:

Setting volatility-based stop-loss levels.
Identifying high-volatility trading opportunities.
Tailoring strategies around price movement patterns.
ATRChart patternsDTR

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan