OPEN-SOURCE SCRIPT
Updated

Ehler's Autocorrelation Periodogram - RSI/MFI

Warning! Frequently hits the execution time limit for scripts.
Especially on initially adding to your chart. Often requires toggling show/hide indicator to get it to complete script execution within the time limit. YMMV!

From TASC Sept 2016 this is Ehler's Autocorrelation periodogram. A means of determining the dominant cycle ("ideal" indicator length / dynamic length).

As an example it's applied here to RSI or MFI. Lower indicator segment displays the autocorrelation spectrum and the computed dominant cycle. Upper segment is RSI/MFI.
Release Notes
Corrected error in calculation
Release Notes
Another fix and initial r values
Release Notes
Corrected HP filter

Disclaimer

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.