Five decimals issue

[Deleted]  

Have been using IBFX, which used four decimals for quotes. Now moved to fxpro which uses five decimals...

Testing few things to see how my EAs work under fxpro 5 decimal quotes...

Ran a test code...

Print(Ask-Bid);
Print(Point);
Print(Digits);
Print(MarketInfo(Symbol(),MODE_POINT));

getting the following results...

0.0003

0

5

0

Ask-Bid is always coming up with four decimals...

Point is 0....

Why?

 
Tom23824:

Have been using IBFX, which used four decimals for quotes. Now moved to fxpro which uses five decimals...

Testing few things to see how my EAs work under fxpro 5 decimal quotes...

Ran a test code...

Print(Ask-Bid);
Print(Point);
Print(Digits);
Print(MarketInfo(Symbol(),MODE_POINT));

getting the following results...

0.0003

0

5

0

Ask-Bid is always coming up with four decimals...

Point is 0....

Why?

This question gets asked about twice a week, the search feature is our friend. :)

https://forum.mql4.com/18143

https://forum.mql4.com/19073

 

Use this construction:

Print(DoubleToStr(Ask-Bid,5));

[Deleted]  
Tom23824:

Have been using IBFX, which used four decimals for quotes. Now moved to fxpro which uses five decimals...

Testing few things to see how my EAs work under fxpro 5 decimal quotes...

Ran a test code...

Print(Ask-Bid);
Print(Point);
Print(Digits);
Print(MarketInfo(Symbol(),MODE_POINT));

getting the following results...

0.0003

0

5

0

Ask-Bid is always coming up with four decimals...

Point is 0....

Why?



I've had this issue too with FXpro and what I was told that any output is any numeric output is always done to 4 decimal places, even though there's a longer decimal place numeric figure stored in memory. One way to check this out is to convert the value to a string and then output the string value. This should give you the 5 decimal places given by fxpro.

[Deleted]  

Thanks everybody...DoubleToStr works...