Download MetaTrader 5
To add comments, please log in or register
Order a robot or an indicator for MetaTrader. The Freelance service will help you!
vivs
43
vivs 2015.06.11 06:24 

How can I include % in StringFormat() function?

I was trying this instruction to display % sign after the stopOut value:

string msg = StringFormat("\nA/C Stop-Out: %g %",stopOut);

But, this instruction is not displaying any result.  

Alain Verleyen
Moderator
28658
Alain Verleyen 2015.06.11 07:12  
%%
vivs
43
vivs 2015.06.11 08:11  
Thanks :)
whroeder1
13641
whroeder1 2015.06.11 10:40  
Vivs: How can I include % in StringFormat() function?
If you read the documentation, PrintFormat - MQL4 Documentation just above the flags section, it says:
If you need to output the percent sign in the format string, use the format specification %%.
/
To add comments, please log in or register