Autocorrelation, also known as serial correlation, is the correlation of a signal with a delayed copy of itself as a function of delay. Informally, it is the similarity between observations as a function of the time lag between them. The analysis of autocorrelation is a mathematical tool for finding repeating patterns, such as the presence of a periodic signal obscured by noise, or identifying the missing fundamental frequency in a signal implied by its harmonic frequencies. It is often used in signal processing for analyzing functions or series of values, such as time domain signals.
This multistep autocorrelation function calculates the correlation of roc (rate of change) between an asset at t and t-1 as well as the correlation of the same asset at t and t-4. The output is an average of the two.
If both outputs show a positive correlation, the color will be green. If only one shows a positive correlation, the color will be yellow. If neither show a positive correlation, the color will be red.
This indicator can be useful as a filter for strategy entry logic (only enter on strong correlation and the strategy entry condition), or as standalone confirmation of strength in a specific direction. It can also be used to filter chop.
Another potential usecase would be as a variable in regression applications.
Enjoy!
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Untuk akses cepat pada chart, tambahkan skrip ini ke favorit anda — pelajari lebih lanjut di sini.
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Untuk akses cepat pada chart, tambahkan skrip ini ke favorit anda — pelajari lebih lanjut di sini.
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.