yatrader2

Autocorrelation Plot

A tool to plot auto correlation of time series, this is useful in identifying periodicity in a time series or signal.

Due to the limits of Pine Script you'll need to add it multiple times if you want autocorrelation beyond 55 periods. I have added it 4 times here for 220 periods.

For more information on Autocorrelation see: en.wikipedia.org/wiki/Autocorrelation

Note: There are 1 bar gaps every 55 because I wanted the labels to remain every 5, but you don't have to have gaps....
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?