# Correlation Index help!

113

Daos anybody here who can say me why in the hell this indicator won't work?

Thank you

Files:
610

albedo:
Daos anybody here who can say me why in the hell this indicator won't work? Thank you

U have to problems:

1) the definition of GbpUsd was not an Array.

it was

2) U have zero divizion

Change it to :

double tmp = MathSqrt((sumX2-(MathPow(sumX,2)/R_Period))*(sumY2-(MathPow(sumY,2)/R_Period)));

if (tmp == 0) tmp = Point;

R[acc]=(sumXY-((sumX*sumY)/R_Period))/ tmp;

Files:
113

elihayun:
U have to problems:

1) the definition of GbpUsd was not an Array.

it was

2) U have zero divizion

Change it to :

double tmp = MathSqrt((sumX2-(MathPow(sumX,2)/R_Period))*(sumY2-(MathPow(sumY,2)/R_Period)));

if (tmp == 0) tmp = Point;

R[acc]=(sumXY-((sumX*sumY)/R_Period))/ tmp;

Oh, i see... thank you

however, now i can see its value, the problem is that this value should be between 1 and -1 and with this solution it shows values greater than 1

i have to give a deep look to the Pearson formula...

Thank you again..

maybe, you want to check the Pearson formula.... ... no, eh?

10

thx. i was looking for it

albedo:
Oh, i see... thank you

however, now i can see its value, the problem is that this value should be between 1 and -1 and with this solution it shows values greater than 1

i have to give a deep look to the Pearson formula...

Thank you again..

maybe, you want to check the Pearson formula.... ... no, eh?
Moderator
120153