Shows the Pearson correlation between two symbols, including statistical significance test.
This is a fork of the original script by Balipour, with the addition of EMA that can be used instead of SMA in the Pearson correlation as an attempt to capture correlation trend changes more quickly, and conversion to pinescript v5. In the end, the EMA does not help much, for a faster capture of correlation trend changes, another kind of correlation is necessary, such as sign test correlation (another one of my indicators implement this idea).
Update: add support for Multi-Timeframe resolution (MTF) per request, but had to remove the Panel to avoid side effects, otherwise PineScript would not compile.
Release Notes
⋅
Fix a small typo in a function that caused side effects (no difference in calculations, but useful to reuse the function elsewhere).
@NEKSUS_, Thank you for your suggestion! I just implemented MTF now, please update your indicator to the last version, you will be able to choose the time resolution you want :-) However note that I had to remove the panel as otherwise the script would not compile due to side effects.
@tartigradia, I don't know if this is possible or not, but if possible, please make it so that when using the indicator on m1 and selecting H1 in the settings, the indicator is updated once an hour. On the minute TF, the line from H1 breaks due to an update on every minute bar.
tartigradia
⋅
@NEKSUS_, Mmmm I'm not sure what is the issue you experience, I cannot reproduce it (I use TradingView Desktop app), but did you try enabling/disabling the gaps option? It may help with repainting. Otherwise, unfortunately this sounds like a TradingView bug, it should not behave like that. Maybe you can send a bug report to TradingView's support team?
kamlesh512
⋅
good to find someone recall balipore works, i missed his variance ratio test , i saved to my set up now tv completly not supprt it can you make it too