foosmoo

Asset Correlation

foosmoo Updated   
This indicator shows correlation strength between the source asset plotted in the main chart and a user-input asset in the indicator panel. For example, if the main chart panel is displaying BTCUSD and the correlation indicator is NDX, then the correlation strength is plotted as the relationship between the two. A strong positive correlation target is set at 0.80 but can be changed. A strong negative correlation target is set at -0.80 and can also be changed.

The indicator also has an option for a plot of the ta.correlation() function for a reference line.
Release Notes:
Changes as follows:
  • Fixed scale issue y axis for reference plot of ta.correlation(), which is hidden by default. As plots can’t be called from a local scope, the transparency of the plot is set to 100 when turned off which previously affected the y axis scale. Update sets ta.correlation() plot value to 0 and transparency to 100, when bShowTradingViewCorrelation is false.
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?