Data stores in array being changed

 

That is correct, 21 points displayed as a double.

Use DoubleToString() in your Print.

ie  DoubleToString(ASK-BID,Digits)

 
Keith Watford:

That is correct, 21 points displayed as a double.

Use DoubleToString() in your Print.

ie  DoubleToString(ASK-BID,Digits)

I am confused,

ASK-BID should be 0.00021,

but it shows 0.000209999999998214..


I store the ASK-BID in array, and output it (0.00020999999)

 
Hao-Wei Lee:

I am confused,

ASK-BID should be 0.00021,

but it shows 0.000209999999998214..


I store the ASK-BID in array, and output it (0.00020999999)


I have already given you the answer.

Keith Watford:

ie  DoubleToString(ASK-BID,Digits)

Print( DoubleToString(ASK-BID,Digits));
 
Hao-Wei Lee: but it shows 0.000209999999998214..
Floating point has infinite number of decimals, it's your not understanding floating point and that some numbers can't be represented exactly. (like 1/10.) Double-precision floating-point format - Wikipedia, the free encyclopedia See also The == operand. - MQL4 forum