Ehlers Adaptive Relative Strength Index (RSI) [Loxx]

loxx Updated   
Ehlers Adaptive Relative Strength Index (RSI) is an implementation of RSI using Ehlers Autocorrelation Periodogram Algorithm to derive the length input for RSI. Other implementations of Ehers Adaptive RSI rely on the inferior Hilbert Transformer derive the dominant cycle.

In his book "Cycle Analytics for Traders Advanced Technical Trading Concepts", John F. Ehlers describes an implementation for Adaptive Relative Strength Index in order to solve for varying length inputs into the classic RSI equation.

What is an adaptive cycle, and what is the Autocorrelation Periodogram Algorithm?

From his Ehlers' book mentioned above, page 135:
"Adaptive filters can have several different meanings. For example, Perry Kaufman’s adaptive moving average (KAMA) and Tushar Chande’s variable index dynamic average (VIDYA) adapt to changes in volatility. By definition, these filters are reactive to price changes, and therefore they close the barn door after the horse is gone.The adaptive filters discussed in this chapter are the familiar Stochastic, relative strength index (RSI), commodity channel index (CCI), and band-pass filter.The key parameter in each case is the look-back period used to calculate the indicator.This look-back period is commonly a fixed value. However, since the measured cycle period is changing, as we have seen in previous chapters, it makes sense to adapt these indicators to the measured cycle period. When tradable market cycles are observed, they tend to persist for a short while.Therefore, by tuning the indicators to the measure cycle period they are optimized for current conditions and can even have predictive characteristics.

The dominant cycle period is measured using the autocorrelation periodogram algorithm. That dominant cycle dynamically sets the look-back period for the indicators. I employ my own streamlined computation for the indicators that provide smoother and easier to interpret outputs than traditional methods. Further, the indicator codes have been modified to remove the effects of spectral dilation.This basically creates a whole new set of indicators for your trading arsenal."

What is Adaptive RSI?

From his Ehlers' book mentioned above, page 137:
"The adaptive RSI starts with the computation of the dominant cycle using the autocorrelation periodogram approach. Since the objective is to use only those frequency components passed by the roofing filter, the variable "filt" is used as a data input rather than closing prices. Rather than independently taking the averages of the numerator and denominator, I chose to perform smoothing on the ratio using the SuperSmoother filter. The coefficients for the SuperSmoother filters have previously been computed in the dominant cycle measurement part of the code."

Happy trading!
Release Notes:
Corrected small error on filter calculation
Release Notes:
Updated algorithm

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: www.patreon.com/algxtrading/membership
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?