OPEN-SOURCE SCRIPT

Rolling Correlation Viewer

152
Pairwise rolling Pearson correlation between the chart symbol and up to three reference symbols (default SPY, QQQ, GLD) over a configurable window. Useful for seeing how diversification and co-movement shift across regimes. It does NOT generate buy or sell signals.

What it shows
- Rolling correlation of the chart symbol versus each of three reference symbols
- A table of the latest correlation values

Honest by design
- No buy/sell signals.
- Non-repainting: the reference symbols are pulled with lookahead off and correlations use confirmed close bars only. The current forming bar updates in real time, which is normal, not historical repaint.

Open-source and MIT licensed.

Disclaimer: impersonal educational and analytics tool. This is not investment advice, not a personalised recommendation, and carries no performance guarantee. Past results do not predict future results. You are solely responsible for your own trading decisions.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.