Limit the n of decimal places in comments
-
Hi.
I would like to be able to limit the n of decimal places in the comments.
personally I dislike seeing so much n.

-
@cesardefez You need to use this formula:

This example is for 0 decimal places. You can select any number of decimal positions you need.
-
Thank you very much. It works perfectly.
-
@cesardefez You're welcome.
-
damn, thank you guys. @cesardefez for asking and @l-andorrà for the reply. This is something that has bothered monitoring my expected profit pips looking like "43.444444456566"
-
hello, sorry for insisting, but it keeps failing,
I pass two photos, where you can see that my board goes from having 12 digits to having 2, and it is continuously alternating.
I have tried to put in settings = NormalizeDouble ($, 2) in the boxes where they assign the value to the variable, in the comment box, of formulas, in all at once and in one at a time. and every time it refreshes, it keeps changing from 2 to 12 digits.
Is there no global mt4 variable where this can be set?
Is there any mql4 code to limit the amounts to be taken into account to calculate?
could you use custom mql code to limit two digitis in mt4?
Thanks a lot

-
@cesardefez if you dont need any decimals, just use an int variable instead of double variable
If you do need some decimals:
https://docs.mql4.com/convert/doubletostring -
hello roar,
I don't know mql4.
I have looked at that link several times.
try putting in setting:
= NormalizeDouble($,2) as I indicated l'andorrà
after reading the article, also try putting the variable name instead of $
= NormalizeDouble(profit_sell,2)
neither option works for me.
I think the simplest thing will be to use int variables, instead of double, and assume the loss of two decimal places. I'm going around this for 4 days without seeing the light.
Thanks a lot -
@cesardefez Hi! Maybe this topic can help you https://fxdreema.com/forum/topic/8188/how-can-i-round-a-number
-
Thanks a lot. I finally get it to work.
thank you thank you thank you