TradingView
Dicargo_Beam
Oct 31, 2021 7:59 AM

Logarithmic Average True Range 

Bitcoin / U.S. dollarBitstamp

Description


In the case of ATR, it is known to represent volatility by simply expressing the price range.
However, of course, as the value of an asset increases, it is not possible to simply compare it with a numerical value, so the ATR was expressed as a percentage using a logarithmic function.
This way we can see the volatility even with ATR.


ATR의 경우 단순하게 가격의 범위만을 표현하여 변동성을 나타낸다고 알려져있습니다.
하지만 당연하게도 자산의 가치가 높아질수록 단순하게 수치만으로 비교할 수는 없고, 따라서 로그함수를 사용해 %로 ATR을 표현하였습니다.
이렇게 표현하면 ATR로도 변동성을 볼 수 있습니다.

Release Notes

calculation revised
Comments
Jaybee003
Thanks a lot for sharing this brillant solution! I had a hard time to figure out a way to calculate the log of price under Pine to make a better estimation of volatility with ATR. I was very happy to be redirected to your publication by competent tradingview staff members when i inquired them about this issue i had. Lets keep up the good work.
Dicargo_Beam
@Jaybee003, Wow, I'm glad you put it to good use.
Jaybee003
@Dicargo_Beam, Yes, for now, this will make my life much easier to continue my evaluations on new types of studies, as I had planned. I may eventually share if the results prove significantly useful. Best regards
Bull_Bear003
Tested the indicator with period length 1 to check. I think you’ve made an error with the calculations so the indicator is not actually showing any useful values.

The log rule of 10 raised to the log base 10 essentially cancels each other out, leaving you with a percent change of price calculation of high divided by the low for a, as an example. Same error is repeated in b and c also.

Basically, your error is calculating the percent change for the period instead of calculating ATR (as of your indi’s current version) by dividing the high by the low for a, high on close(1) for b and close(1) on low for c. No logs were involved. Suggest you should revise your indicator.
Dicargo_Beam
@Bull_Bear003, Looking at the average percent change is what I intended. The difference between 1000 and 100 on the standard scale and the difference between 10000 and 1000 are different, but on the log scale they have the same percent change, so they are 900 and 9000 on the original tr, but they have the same value on this index. Also, errors in calculations were found and corrected.
Bull_Bear003
@Dicargo_Beam, My bad. I meant “…instead of calculating LOG ATR percent…”. Appreciate the revision! Will test it out and give you extra feedbacks if any.
Bull_Bear003
@Dicargo_Beam, Somehow your indicator isn’t showing on the list.
heresURstupidchart
This is exactly what I was looking for
Bull_Bear003
@heresURstupidchart, The calculation is wrong. This indicator does not show the Log of ATR percent.
Jaybee003
@Bull_Bear003, You are wright! It is the ATR from the log of price instead of the ATR of price. This is a much better approximation of the volatility at any time. It is not affected by the current level of the price. This is a great improvement of the ATR that is more meaningfull when we want to compare different markets or longer time period.
More