taylor_o

energies_correlation_zscore

taylor_o Updated   
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
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?