OPEN-SOURCE SCRIPT

ATR Percentage

업데이트됨
The ATR is a great indicator, but for me, it does not define the volatility of an asset I am looking at well enough. So I've adjusted it to be displayed as the usual ATR and a percentage of the closing prince (which to me tells a better story). I find this useful if I am looking through many assets and have to create a quick picture of volatility.

Indicator Definition: The script starts by defining an indicator named "ATR Percentage" that will be displayed in a separate pane (not overlayed on the price chart).

Input for ATR Period: The user can set the period for calculating the ATR through an input field.
ATR Calculation: The ta.atr function calculates the Average True Range based on the specified period.

ATR Percentage Calculation: The ATR value is converted to a percentage of the current closing price using (atrValue / close) * 100.

Plotting:
The script plots both the ATR value and its percentage on the chart.
A horizontal line at zero is added for reference.

Label Display: An optional label displays the current ATR percentage at every 10th bar to avoid cluttering the chart.

Background Color: A light blue background is added to visually separate the ATR indicator from other indicators.

릴리즈 노트
ATR displayed as a percentage.
릴리즈 노트
ATR Percentage with Baseline is a volatility indicator that expresses the Average True Range (ATR) as a percentage of price, making it easier to compare volatility across different price levels. The indicator features two lines:

A short-term ATR percentage (default 5 periods, red line) showing current volatility
A longer-term baseline ATR percentage (default 50 periods, gray line) showing historical or normal volatility levels

This configuration helps traders identify when current volatility is deviating from typical levels. Optional features include displaying the raw ATR value, zero line, and background coloring. All components can be toggled on/off through the indicator settings.
Primarily useful for:

Comparing volatility across different price levels
Identifying periods of abnormal volatility
Adjusting position sizes based on current market conditions
Setting dynamic stop levels
ATRatrpercentageVolatility

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

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

면책사항