Function Code for pearson correlation to use in MQL4 AND MQL5

MQL5 Libraries Converting

Job finished

Execution time 4 hours
Feedback from customer
Well done! Fast and professional.
Feedback from employee
Great man!

Specification

Hello there,

i need a function (usable in MQL4 and MQL5 - best, if the code is equal) for calculating the pearson correlation between two assets. The function must have the following format:

double pearson(double array &asset1,double array &asset2, int shift asset 1, int shift asset2, int bars to calculate)

{
// function code
return(pearsoncorrelation);
}

The return value must be double and between -1 and 1. The arrays containing close prices in various time frames.

I need the MQL4 (and MQL5) Source Code.

Thank you!

Responded

1
Developer 1
Rating
(312)
Projects
521
47%
Arbitration
29
10% / 45%
Overdue
139
27%
Working
2
Developer 2
Rating
(590)
Projects
789
71%
Arbitration
9
33% / 33%
Overdue
22
3%
Free
Published: 8 codes
3
Developer 3
Rating
(250)
Projects
460
26%
Arbitration
140
20% / 59%
Overdue
100
22%
Working
4
Developer 4
Rating
(54)
Projects
53
17%
Arbitration
7
0% / 100%
Overdue
5
9%
Free
5
Developer 5
Rating
(24)
Projects
27
33%
Arbitration
2
100% / 0%
Overdue
1
4%
Free
6
Developer 6
Rating
(277)
Projects
334
55%
Arbitration
14
36% / 29%
Overdue
1
0%
Free

Project information

Budget
30 - 50 USD
Deadline
to 5 day(s)