OPEN-SOURCE SCRIPT
Updated

energies_correlation_zscore

1115
A table to help track correlations between the four major energies contracts of the CME. The table shows the z-score of the current correlation value between HO, RB, CL, and NG. The inputs are:

- timeframe: the timeframe of the calcluation. the default is 5 minutes.
- window: the rolling window over which to calculate the correlations. the default is 48, or four hours given the default timeframe.

A score of zer means that the correlation over the latest window is in line with the average for all windows sampled from the chart history. More positive scores imply higher positive correlation than normal, and vice versa for negative scores.
Release Notes
- input option to toggle between the raw correlation and zscore

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.