ejmin ejoni
91
ejmin ejoni  

hi 

i wrote this , but it dont shows me real spread, why?

 Comment("SPREAD =" + (Ask - Bid));
Files:
s.jpg  335 kb
Keith Watford
Moderator
29948
Keith Watford  
Comment("SPREAD =" + DoubleToString(Ask - Bid,Digits));
Nor Azman Bin Ramli
217
Nor Azman Bin Ramli  

You can achieve the same result with this

Comment("Spread = ", MarketInfo(NULL, MODE_SPREAD));
ejmin ejoni
91
ejmin ejoni  

Keith Watford:

Comment("SPREAD =" + DoubleToString(Ask - Bid,Digits));


no i mean , how can i comment dont normalized ASK and BID prices(with real 3 or 5 digits), what we see in market watch?

Keith Watford
Moderator
29948
Keith Watford  
ejmin ejoni:

no i mean , how can i comment dont normalized ASK and BID prices(with real 3 or 5 digits), what we see in market watch?

Please write more clearly, that is almost gibberish.

Dominik Egert
1323
Dominik Egert  
Well, when you try to calculate current spread and you want it to be in natural numbers, you need to multiply by pow of digits.

(ask - bid) * 10^digits

As far as I understand your intentions.

And yes, it would be very polite to in fact be more clear about what you are trying to accomplish.