chill05

Correlation Coefficient Table

chill05 Cập nhật   
This is a sample PineSript code implementation using Correlation Coefficient. It uses the ta.correlation library of Pinescript and calculates the correlation based on user input length. The results are then plotted on a table. The corr value displays the actual correlation coefficient value while the Corr Status displays the interpretation of the correlation coefficient values.

The script takes the following input
  • Source Symbol - This is the base symbol which will be used in calculating correlation coefficient. In my case, since i am looking more often on crypto. I defaulted it to BTCUSDT
  • Symbol 1 - Symbol 5 - These are the coins that will be compared to our base symbol for correlation.
  • Source - You can select on which price source you want to be calculated. By default this is set to candle close price.
  • Length - The number of price bar to look back and retrieve correlation coefficient. Set to 20 bars by default.
  • Table Settings - Since the correlation coefficient are displayed on a table. An option to customize the table settings are presented.


The Correlation Status column was based on this Interpretation:


For more information, read this article https://www.tradingview.com/scripts/correlationcoefficient/?solution=43000502022
Phát hành các Ghi chú:
  • Removed the plot function of the actual correlation coefficient value as it only adds noise to chart.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?