rumpypumpydumpy

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 .
Catatan Rilis: Corrected error in calculation
Catatan Rilis: Another fix and initial r values
Catatan Rilis: Corrected HP filter
Skrip open-source

Sejalan dengan semangat TradingView, penulis skrip ini telah mempublikasikannya secara open-source, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk sang penulis! Anda dapat menggunakannya secara gratis, tetapi penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk dapat menggunakannya didalam sebuah chart.

Inggin menggunakan skrip ini pada chart?

Komentar

Great script!
Please check lines 68 and 69
In line 68 instead of cosine function there are must be sine function
In line 69 instead expression "array.get(cospart, period) + array.get(corr, n) +" there are must be "pow(array.get(cospart, period),2)"
+1 Jawab
rumpypumpydumpy harkalada31
@harkalada31, Thank you for pointing that out
Jawab
harkalada31 rumpypumpydumpy
You're welcome. Also please check line 74 after "0.2 * pow(array.get(sqsum, period),2) +" there are must be 0.8*array.get(r2, period) according J.Ehlers article.
+1 Jawab
rumpypumpydumpy harkalada31
@harkalada31, Thanks again :) I must have been high or something. It brings up the issue of initial R1 being empty. I think this should be correct now.
Jawab
harkalada31 rumpypumpydumpy
@rumpypumpydumpy, you're welcome! I found another problem. Please check line 24, you forgot to divide the expression on cos(c/48). I compared your script with my own and after that correction we have identical results (i applied sine wave as a test signal).
Jawab
Hey buddy, fanastic job on this one
+1 Jawab
Thank you for your great effort.
dominantcycle and smoothed dominant cycle - both are terribly small compared to all other calculations available.
Will you please review it.
Just noticed it. Is there any reason for it.
Thank you for your time n attention.
Jawab
One question - is the MFI\RSI's period length automatically tuned by the autocorrelation here?
Jawab
this script is super, thanks for sharing!
Jawab