Noldo

Function : Multiple Correlation


This script was written to calculate the correlation coefficient (Adjusted R-Squared) for one dependent and two independent variables.(3-way)
Pearson correlation method was used with exponential moving averages as the correlation calculation method.
Use your source ( i use "close" generally ) as the dependent variable.
Inspired by this article : www.real-statistics....ultiple-correlation/

The Adjusted R-Squared coefficient is used as output, but the R-Squared coefficient is also available in the code.
Adjusted R-Squared is often used for multiple correlations.
It also gives better results in large samples.
Here is the article about the difference of the two coefficients : www.investopedia.com...djusted-rsquared.asp

I wrote this function to increase the efficiency of my Dow Factor I used before.
When my research is over, I will apply the 3-factor correlation to my scripts.
I hope that I will achieve more efficient indicators and oscillators and even strategies.

In this command, I gave a few variable values ​​and plotted them as an example.
I hope this function is useful in your work.
Finally, you can use periods as mutable variables.
The function is recovered from integer loads.
Best regards. Noldo

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 đồ?