Download MetaTrader 5

How parse 0.000000 to 0.

To add comments, please log in or register
Do you keep a blog? Place a link to there and make money!
bisewski 2013.12.12 20:44 


I created an pipe communication with my .net app and mt4.

When an onder are open, your close price is 0.

So I need send exactly this digit to my app, only 0. But mt4 is send 0.00000000 . I create a var called closePrice as double. Need to be double because the close price is a double number and if is different that 0 so the order is closed and this value can be like a 1.34568 .

How can I send only one 0 value and not 0.0000000? If I use the DoubletoStr I have a problem, because DoubletoStr(closePrice,0) if is equal 1.34567 so I receive only the number 1.

Any idea?


whroeder1 2013.12.12 21:19  
It doesn't matter what the senders resolution is. You reading the string into a double you get a double INFINITE resolution. 0 is the same as 0.0 is the same as 0.000000000000000000000000000000000.
To add comments, please log in or register