TradingView
andre_007
12 gru 2022 01:08

Average True Range Refurbished 

Bitcoin all time history indexINDEX

Opis

â‹…
💡 Objective
This script is a rebuild of the pre-existing ATR indicator, with improvements and fine-tuning.

🪄Improvements

1. Normalization option (range 0 to 100)


2. Optional calculation of the ratio between current volatility and average volatility


3. Optional smoothing


4. Show a moving average


5. Show Bollinger Bands with 3 bands


6. Change bar colors according to ATR and Bollinger Bands

📚 Definition

'The Average True Range (ATR) is a tool used in technical analysis to measure volatility. Unlike many of today's popular indicators, the ATR is not used to indicate the direction of price. Rather, it is a metric used solely to measure volatility, especially volatility caused by price gaps or limit moves.'
(TradingView)

Informacje o Wersji

â‹…
Some fixes and improvements.
Komentarze
egruber
â‹…
This variante of ATR looks interesting, especially with volatility zones clearly displayed. How do you use this indicator to enter in position ?
andre_007
â‹…
@egruber, Hello. Basically there are two use cases.
(1) Stop loss/take profit calculation based on average volatility;
(2) Turning points or trend confirmation.

--> Example use case 1:



From the daily ETH/USD chart above, based on Bollinger Bands with a 233-period average, I know that the long-term average volatility is $99.52, and the maximum volatilities considering standard deviations of 2, 5, and 8, are $162, $238, and $325 respectively.
If the current volatility is like $28.73, I can get an idea, in that operating period, of the upside/downside potential.

--> Example use case 2:
In the example below, I'm using it as a volatility electrocardiogram, with normalization from 0 to 100 turned on.
Parameterizing Bollinger Bands with 55 periods, yellow markers when volatility reaches a minimum of zero and a maximum of 100:


By changing the type of graph, the visualization can be easier, according to personal taste.
Below, I switched from line to histogram, adjusted the Bollinger Bands for 21 periods only, and set the standard deviation to 1, 2, and 3:




As shown in the graph above, we are now in a period of low volatility, indicating a moment prior to a large movement.

Another example with the same configuration as above, but smoothed ATR:
egruber
â‹…
@andre_007, Thanks for those precise explanations. I'm wondering if the following is also a use case of the indicator : When the ATR is above the upper bollinger band i.e. over the colored ribbon, then there is a strong trend and even if it's too late, it's a strong confirmation to place and order and to avoid false signal. What do you think ?
andre_007
â‹…
@egruber, Yes, you would have to adjust the parameters and test.
I would use a second indicator to help with this, like a set of moving averages for example.
Below is an example from Exxon Mobil.

Parameters:

Normalize Length = 55
Smooth = 14
Bollinger Bands Length = 55
Standard Deviation = 1, 2, 3 (I disabled the band lines in the Style section to make it look better)
Change color of ATR when above or bellow BB's MA
Change color of BB's MA when above or bellow ATR
Show markers when ATR reaches limit / Bottom = 15, Top = 60 / Yellow
Change bar color when ATR is outside BB / Bellow = Purple, Above = Blue



I hope I've helped.
egruber
â‹…
@andre_007, Thanks again. Actually, I try to use it in 1m timeframe for EUR/USD short term trading. Would those parameters be ok for that ?
andre_007
â‹…
@egruber, I found some examples.
However, in a very short period there can be many false signals.


There is no perfect indicator. Even over a longer period there may be false signals.
Here in BTC, the ATR sometimes breaks out of the Bollinger Bands without indicating a clear trend, just quick liquidation movements.

egruber
â‹…
@andre_007, I will backtest this, thank you so much !
Więcej