Fix display of deciimals in Comments

 

Hello,

I am developing an EA and have a display problem.

string temp = "Signals\n";
temp = temp + "--------------------------------------\n"
+ "Up_Op " + UpSignalOpen + "\n" <- example output is 0.12345000000
+ "Up_Cl " + UpSignalClose + "\n" <- example output is 0.12345000000
+ "------------------------------------------------\n"
+ "Dn_Op " + DnSignalOPen + "\n" <- example output is 0.12345000000
+ "Dn_Cl " + DnSignalClose + "\n" <- example output is 0.12345000000
+ "--------------------------------------\n";

Comment(temp);

I would like to find out how to specify the number of digits to the right of the decimal point (preferably 5) and also increase the font size so that it is larger than the MT4 default ?8 points to 12 points.

Is this doo-able?


Any help gratefully appreciated.

 

If you use comment("Bid=",Bid) instead of comment("Bid="+Bid) you'll get output up to 4 digits. If you want to specify the exact number, use

comment("Bid=", DoubleToStr(Bid, Digits));

Comment font size can't be changed. If you want that you'll have to use text objects.

Reason: