LeviathanCapital

Correlation Matrix + Heatmap - By Leviathan

A quick and easy way to visualize the correlation between 10 different symbols over a custom period of time, in the form of a matrix with a heatmap visualization and additional tools such as price increase/decrease %, multi-timeframe function, customizable appearance and more.

The indicator displays correlation coefficients for each pair of 10 assets in a matrix format, where the rows and columns represent the assets being compared between each other. The color of each cell corresponds with the strength of the correlation coefficient, allowing you to quickly identify which assets are strongly correlated, and which are not, and use that information to adjust risk or even get trade ideas. Coupled with the "Price Change" function, the script will help you find trade opportunities based on eg. the long-term correlation strength and short-term price direction differences between two assets. The "Correlation Length" input defines the number of bars used for calculating the correlation, while "Price Change Length" defines the bar to which the current price is compared when calculating price change (eg. the input 20 means that the script will compare the price of the candle close that occurred 20 bars ago and the current price).

Correlation coefficient:
The correlation coefficient is a statistical measure that quantifies the degree of linear relationship between two variables. The correlation coefficient ranges from -1 to 1, with 1 being perfect positive correlation and -1 being perfect negative correlation.

• A correlation coefficient of 1 indicates a perfect positive linear relationship between two variables. This means that when one variable increases, the other variable also increases in a proportional manner.
• A correlation coefficient of 0 indicates no linear relationship between two variables. This means that changes in one variable do not affect the other variable.
• A correlation coefficient of -1 indicates a perfect negative linear relationship between two variables. This means that when one variable increases, the other variable decreases in a proportional manner.

Inspired by @RicardoSantos's script

Register to support free indicators:
BYBIT: partner.bybit.com/b/Leviathan
WOO X: referral.woo.org/7MY2
Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?