The script shows the maximum and minimum correlation for the selected period of history, for example, for the last 10,000 candles. Thus, it is possible to analyze in advance which pairs and how they correlate. In the parameters, we set the Tf correlation period and the correlation analysis period. Pairs with direct correlation whose correlation is higher than the parameter set in the settings are highlighted in green. And the pairs with inverse correlation that meet the conditions of minimal correlation for trading are highlighted in red.
There are two digits in each cell. The minimum and maximum correlation that was during the last X candles. X-Bearshistory (1000) the depth of the history for correlation analysis (set as the number of candles)
MinCorrelation sets the colorization level. Above this value, the script highlights the cells in red or green.
If a very large range of values is set, then the following error “eXXX” may appear, This indicates that the script cannot read all the quotes that are included in this range. You should update the quotes or change the range of the quote analysis.