TradingView
alexgrover
١٢ تموز يوليو ٢٠٢٠ ١٥:٤٩

Trending True Range 

Advanced Micro Devices, Inc.NASDAQ

الوصف

Display a smoothed true range during trending markets, thus filtering any measurement occurring during ranging markets. Whether the market is trending or ranging is determined by the position of the efficiency ratio relative to its Wilder moving average.

Settings

  • Resolution : resolution of the indicator
  • Length : period of the efficiency ratio and the Wilder moving averages used in the script


Usage

If you are not interested in volatility during ranging markets, this indicator might result useful to you. An interesting aspect is that it both measures volatility, but also determine whether the market is trending or ranging, with a zero value indicating a ranging market.



Indicator against Atr, with both length = 14, our indicator might be easier to interpret.

Note

Thx to my twitter followers for their suggestions regarding this indicator. I apologize if it's a bit short, the original code was longer and included more options, but forcing a script to be lengthy is a really bad idea, so I stayed with something less flashy but certainly more practical, "classic Grover" some might say.

Thx for reading!

التعليقات
Koalafied_3
Mate, this is some great stuff. I've been using multiple instances of this at different lengths (short-long) to help identify market context and as a trade filter and it's working great as part of my confluence/price action strategy. Much appreciate your open source work. Cheers
alexgrover
@thomasjaworski667, Yr welcome :)
LunaOwl
Your ability to innovate was amazing, I envy.
AlexCar
@LunaOwl, Lol two of my favorite authors on the same thread. : D
DannyBaker
Already put it to use thanks Alex! P.S. what adaptive MA would you recommend?
jerah310a
Thank you so much, @alexgrover.
CryptoGearBox
Great work, thank you! You truly are efficient at making code short.
CryptoGearBox
@alexgrover I forgot to ask, how come you chose RMA? Is there an advantage over other smoothers in this specific case? Thanks!
alexgrover
@XFob, The average true range is simply the RMA of the true range, as such I wanted to use the RMA, compared to an EMA the RMA is smoother.
CryptoGearBox
@alexgrover, oh right! I've been learning a lot from the teachings in your posts, thank you again for all of it.

What springs to mind when I asked the question about the smoother is the lag involved in RMA. Is the only way to get "zero lag" by increasing the amplitude response and zeroing the phase response? This has the undesired effects for this specific indicator because it causes overshoot (unwanted bumps) where it should be zero. In your expert opinion, is it possible reduce lag without the expense of non-causality? I'm bad at math so it's tough to wrap my head around this stuff.
المزيد