int digits=SymbolInfoInteger(symbol, SYMBOL_DIGITS); string bidstr=DoubleToString(SymbolInfoDouble(symbol, SYMBOL_BID),digits);
Thank you. I tried this before asking, and it did not work.
Daniel Arges:
But it should, according to its specification. Show your code if it's not working.
Thank you. I tried this before asking, and it did not work.
Daniel Arges:
I use StringFormat() for all my string formatting needs.
// typed from memory; not tested str = StringFormat("%s,%.5f,%.5f", symbol, SymbolInfoDouble(symbol, SYMBOL_BID), SymbolInfoDouble(symbol, SYMBOL_ASK));
@lippmaje is correct that DoubleToString() should work; however, in tens of thousands of lines of code, I think I have used DoubleToString() only once.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
When I export some values to CSV files, by the function FileWrite(), when I convert double numbers to string, in some cases they loss the point (.), and show numbers without any standard format.
Manly for the BID and SWAP values, the convertion from double for string is not working properly.
Can anybody help me?
Thks