jb1981:
I read on the forums about using DoubletoStr. Would it work and how would I be able to implement that?
DoubleToStr(avg_price,Digits) //or int d=MarketInfo(Symbol(), MODE_DIGITS) DoubleToStr(avg_price,d)
jb1981: displaying the current spread (Bid - ask). It works fine for up to 4 decimals, but I need the spread to be displayed as 0.00005 for example. | double spread = Ask - Bid; // 5 digit 4 digit broker // EURUSD USDJPY EURUSD USDJPY PriceToStr(spread) // "0.00015" "0.025" "0.0001" "0.02" DeltaToPips(spread) // "1.5" "2.5" "1" "2" |
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
Hi Guys, having issues with displaying the current spread (Bid - ask). It works fine for up to 4 decimals, but I need the spread to be displayed as 0.00005 for example.
My code is quite simple (please see below)
What i've done so far:
Tried changing 'double avg_price = (ask_price - bid_price)' to float, long, etc but doesn't work.
I read on the forums about using DoubletoStr. Would it work and how would I be able to implement that?
Thanks and apologies if my question has been asked already.