Download MetaTrader 5
To add comments, please log in or register
Do you have Linux? Find out how to install MetaTrader on it!
Musngi
269
Musngi 2016.10.17 06:32 

Is there any function to show Positive & Negative Sign for numbers? For example if the result is 5.0 it should display the +5.0 and for negative number -5.0.

I tried to use "+ sign" to concatenate but if I use #property strict it gives me warning: implicit conversion from 'number' to 'string'. That's why I'm looking for the best solution for this kind of task.

If I need to convert the negative number into positive number with plus sign then I need to do this: 

reverse_negative = Dict_CAD[x];
"+"+-reverse_negative;    // negative to positive number with plus sign added

honest_knave
959
honest_knave 2016.10.17 09:00  

You are only interested in how the number is displayed, not the number itself.

Read up on StringFormat and PrintFormat

Musngi
269
Musngi 2016.10.17 09:22  
honest_knave:

You are only interested in how the number is displayed, not the number itself.

Read up on StringFormat and PrintFormat

 

 

Which is the best function?

Your name is familiar to me, I think your are the creator of MADdash?

/
To add comments, please log in or register