TradingView
lastguru
17 апр 2022 г., 03:10

Relative Strength Super Smoother by lastguru 

Bitcoin / TetherUS PERPETUAL CONTRACTBinance

Описание

A better version of Apirine's RS EMA by using a superior MA: Ehlers Super Smoother.

In January 2022 edition of TASC Vitaly Apirine introduced his Relative Strength Exponential Moving Average. A concept not entirely new, as Tushar Chande used a similar calculation for his VIDYA moving average. Both are based on the idea to change EMA length depending on the absolute RSI value, so the moving average would speed up then RSI is going up or down from the center value (when there is a significant directional price movement), and slow down when RSI returns to the center value (when there is a neutral or sideways movement). That way EMA responsiveness would increase where it matters most, but decrease where there is a high probability of whipsaw.

There are only two main differences between VIDYA and RS EMA:
  • RSI internal smoothing - VIDYA uses SMA, as Chande's CMO is an RSI with SMA; RS EMA uses EMA
  • Change direction - VIDYA sets the fastest length; RS EMA sets the slowest length

Both algorithms use EMA as the base of their calculation. As John F. Ehlers has shown in his article "Predictive and Successful Indicators" (January 2014 issue of TASC), EMA is not a very efficient filter, as it introduces a significant lag if sufficient smoothing is required. He describes a new smoothing filter called SuperSmoother, "that sharply attenuates aliasing noise while minimizing filtering lag." In other words, it provides better smoothing with lower lag than EMA.

In this script, I try to get the best of all these approaches and present to you Relative Strength Super Smoother. It uses RS EMA algorithm to calculate the SuperSmoother length. Unlike the original RS EMA algorithm, that has an abstract "multiplier" setting to scale the period variance (without this parameter, RSI would only allow it to speed up twice; Vitaly Apirine sets the multiplier to 10 by default), my implementation has explicit lower bound setting, so you can specify the exact range of calculated length.

Settings:
  • Lower Bound - fastest SuperSmoother length (when RSI is +100 or -100)
  • Upper Bound - slowest SuperSmoother length (when RSI is 0)
  • RSI Length - underlying RSI length. Unlike the original RSI that uses RMA as an internal smoothing algorithm, Vitaly Apirine uses EMA, which is approximately twice as fast (that is needed because he uses a generally long RSI length and RMA would be too slow for this). It is the same as the Upper Bound by default (0), as in the original implementation

The original RS EMA is also shown on the chart for comparison. The default multiplier of 10 for RS EMA means that the fastest EMA period is around 4. I use the fastest period of 8 by default. It does not introduce too much of a lag in comparison, but the curve is much smoother.

This script is just an interface for my public libraries. Check them out for more information.
Комментарии
slowcoconut
just found ya but already lovin your work...

im in the process of finding a tight-fitting moving average that presents smooth maximums and minimums, points of inflection etc. with minimal lag...
lastguru
@slowcoconut, thanks, when I made this combination, it was love on first sight - probably one of the best MAs out there. I will add Jurik MA to my collection soon, as many people are saying that it works great. But if you find some uniquely great MA, send me a message :)
walkwalk
hello everywanone11..i am still new and learning thus wanted to know your opinion on rsi ..for ltf like 5 to 15..what would be best ? 0 or 14..20..or any other...i dont even know how does it effects but i am still learning..anywayz i just wanted to know your opnion only so dont worry abt disclaimer and all..and feel free to your suggestion or opinions..also whay other indicator would you guys think that goes well with this this indicator
davewantsmoore
Ещё