This script calculates the covariance and correlation coefficient between two markets using arrays.
Lookback: How many bars to perform the calculation on.
Source: Price source to calculate the correlation on.
Reference Market: The reference market to compare to the current market.
It's a simple indicator, but very useful for determining how correlated your...