TradingView
millerrh
2 янв 2020 г., 02:35

Average True Range Percentage (ATRP) 

Ether / United States DollarCoinbase

Описание

ATR measures volatility, but you can't compare one instrument vs. another with it because the ATR value will be different depending on the price of the instrument. I went searching for something like ATR but with percentages, so you could compare one stock vs. another to find who is more volatile and found this.

It was exactly what I was looking for, so decided to re-create it in TradingView. Enjoy!

Description
Average True Range Percent (ATRP) expresses the Average True Range (ATR) indicator as a percentage of a bar’s closing price.

How this indicator works
  • ATRP is used to measure volatility just as the Average True Range (ATR) indicator is. ATRP allows securities to be compared, where ATR does not.
  • ATR measures volatility at an absolute level, meaning lower priced stock will have lower ATR values than higher price stocks. ATRP displays the indicator as a percentage, to allow for securities trading at different prices per share to be compared.


Calculation
ATRP = (Average True Range / Close) * 100

Информация о релизе

Added a moving average to this script to remove some of the noise you get with the normal ATRP display. This should make it easier to compare the average volatility of a stock relative to other stocks easier.

Информация о релизе

Added the ability to change the timeframe that this indicator looks at. The way I plan on using this is to have my chart set to intraday time frames but have a visual on what the daily Average True Range Percentage is. This will give a better visual for comparing stocks relative to one another on how volatile they are over a daily range instead of how volatile they are just on the intraday time frame.
Комментарии
BROHEMITH
This made my day to find that you've already made ATR as a percentage. Thank you!!!!!!!!!!! You rock
millerrh
@BROHEMITH, I also discovered that the "Volatility" filter in the stock screener is similar. The monthly volatility is the average daily range over the last 21 days. So I've been using that as my comparison recently. It's more like ADR than ATR, but gives a good relative comparison between stocks which is why I wanted this in the first place.
jaybytes
Thank you for this!
MisterT123
Hi Millerrh!

I noticed that the Average True Range is available in TradingView, but I did not see the Average True Range Percentage. Great job!

I have a question though: do you know whether it is possible to implement this Average True Range Percentage in a stock screener? So for instance, only filtering on all stocks which have crossed their Average True Range Percentage for 140%? In my case, the Average True Range (ATR) for the period of 14 days. And specifically how many times a stock has crossed its ATR: I would like the scanner to only scan for stocks which have crossed their ATR 1.40 times. For instance: the ATR of a $100 stock is 2.78. This stock would only come into the scanner if it reaches its ATR for 1.40 times (in this case this equals 3.85).

Thanks in advance!
millerrh
@MisterT123, It's not possible to use custom scripts in the screener unfortunately. The closest thing I've seen is the "Volatility" which looks to me to be exactly the same as the Average Daily Range in percentage terms. So the Monthly Volatility is like looking at the 21 day ADR%, which is very close to the intent of this indicator I created.

In order to leverage the screener with something I look at day to day, I created another indicator which compares the performance of a stock against a benchmark including the ADR (same formula the screener uses for Volatility). tradingview.com/script/jE9szaxP-Relative-Performance/ So I use that now as a sub for this ATRP indicator since I can match it with searches.
MisterT123
@millerrh,

Thank you for your quick reply!

It's unfortunate that you cannot use customized scripts in the screener, since the ATR % is actually so "easy" to expand when the ATR itself (in absolute form) is already present in TradingView.

I think I understand the point that you're making regarding the Volatility indicator in the screener, and that it's quite similar to the ADR. But I'm not sure that that would fit my strategy. Because I only focus on stocks which have crossed their ATR 1.40 times.. Nevertheless, thanks for the work that you've done and for your extensive answer!
millerrh
@MisterT123, oh yes, if you are using the plotted lines you are correct, not the same. I was just doing it to look for and compare stocks based on "how much they move." So the volatility works for that at least.
MisterT123
@millerrh, Yes now I understand what you were referring to. Well, at least thanks for your answer!
Luthaine
So the difference between the white and green font values is one uses the closign price, while the other uses the moving average?
millerrh
@Luthaine, The green line is the average of the ATRP, the white line is the ATRP in real time.
Ещё