5 decimal place problems

 

Probably I am missing something silly but -

I have changed my code to add X x 10 x Points etc and the EA works fine. However I do use a lot of print statements in my code and am frustrated by things like below:

Print(Ask);

Print(CurrentZig);

etc

These all print in the logs as 1.XXXX only 4 decimal places where as orders etc use 5 decimal places.

Is there a simple way to make all these display as 5 deimal places or am I going to have to change every Print statement.

Also, what happens with all the indicators and predefined variables (Ask, Bid, etc) kindly provided with the platform - do they actually work to 4 or 5 decimal places - it appears to be 4 although all the orders display in the logs as 5 decimal places.

 
BigAl wrote >>

Probably I am missing something silly but -

I have changed my code to add X x 10 x Points etc and the EA works fine. However I do use a lot of print statements in my code and am frustrated by things like below:

Print(Ask);

Print(CurrentZig);

etc

These all print in the logs as 1.XXXX only 4 decimal places where as orders etc use 5 decimal places.

Is there a simple way to make all these display as 5 deimal places or am I going to have to change every Print statement.

Also, what happens with all the indicators and predefined variables (Ask, Bid, etc) kindly provided with the platform - do they actually work to 4 or 5 decimal places - it appears to be 4 although all the orders display in the logs as 5 decimal places.

The issue is with the print() function. Use Doubletostr function within print.

 
Tom23824 wrote >>

The issue is with the print() function. Use Doubletostr function within print.

Thanks Tom, thought as much I hope something is done about it because I think it should be corrected as part of the change to 5 decimal places.

After all it used to work ok for 4 places (even if there were really 5)

Reason: