HxroLabs

Multistep Autocorrelation

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!

Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?