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!

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?