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.

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?