SquareRoot:
CloseDiff[i]= Close[i]-Close[i+1];
Print("Close[i]=", Close[i]," Close[i+1]=", Close[i+1]," CloseDiff=", CloseDiff[i]);
The following code subtracts the close of 2 bars. The resulting value (CloseDiff) is zero but the 2 close values are not the same. I verify this by PRINTing the values to the expert panel.
Can someone explain what might be happening here? I am stumped.
double CloseDiff[];
for(i=0; i <= Bars; i++)
{CloseDiff[i]= Close[i]-Close[i+1];
Print("Close[i]=", Close[i]," Close[i+1]=", Close[i+1]," CloseDiff=", CloseDiff[i]);
}
sample print: Close[i]=1.7355 Close[i+1]=1.7347 CloseDiff[i]=0
Problem found!!!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The following code subtracts the close of 2 bars. The resulting value (CloseDiff) is zero but the 2 close values are not the same. I verify this by PRINTing the values to the expert panel.
Can someone explain what might be happening here? I am stumped.
double CloseDiff[];
for(i=0; i <= Bars; i++)
{CloseDiff[i]= Close[i]-Close[i+1];
Print("Close[i]=", Close[i]," Close[i+1]=", Close[i+1]," CloseDiff=", CloseDiff[i]);
}
sample print: Close[i]=1.7355 Close[i+1]=1.7347 CloseDiff[i]=0