For the convenience of selecting tools, I wrote an indicator. It shows the change in the correlation coefficient of the instruments over the entire history.
In the parameters, we specify the tools for which we check the correlation and the period for which we analyze the correlation. The correlation is determined on the current TF and is drawn throughout the history.

simbol_1 = “AUDUSD”;
simbol_2 = ” NZDUSD”;
ControlBars = 300; period
For successful trading on the hedging strategy, choose such pairs of instruments that do not go through 0 for the entire period of history or at least for a very long period…. It
works for a very long time because it iterates over a huge amount of data. Do not run it on VPS or weak PCs so that they do not hang. It is not necessary to put it on the chart constantly. It is enough to analyze the correlation only once and remove the indicator from the chart, otherwise it will overload the terminal.

Ind Correlation History
Ind Correlation History
10.3 KiB
Ind Correlation History
Ind Correlation History
18.0 KiB