NT30356

Multi Timeframe ATR Indicator

The Average True Range (ATR) indicator is a technical analysis tool used to measure market volatility. The ATR indicator is designed to capture the degree of price movement or price volatility over a specified period of time. It does this by calculating the true range for each bar or candlestick on a chart and then taking an average of these true range values over a set period.

In the provided Pine Script code, the ATR indicator is being calculated for two different timeframes, which allows traders to compare volatility across different periods. The script includes user-defined inputs for the length of the ATR calculation and the type of smoothing (RMA or SMA) to be applied to the true range values. The 'smoothingFunc' function within the script determines whether to use the RMA (Relative Moving Average) or SMA (Simple Moving Average) based on the user's selection.

The true range for each bar is calculated as the maximum of the following three values: the difference between the current high and low, the absolute value of the difference between the current high and the previous close, and the absolute value of the difference between the current low and the previous close. This calculation is designed to ensure that gaps and limit moves are properly accounted for in the volatility measurement.
The script then uses the 'smoothingFunc' to calculate the ATR values for the two timeframes, and these values are plotted on the chart as two separate lines, allowing traders to visually assess the volatility levels.

Overall, this custom ATR indicator is a versatile tool for traders who wish to analyse market volatility and compare it across different timeframes, potentially aiding in making more informed trading decisions based on the prevailing market conditions.

Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?