spread

 

hi 

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

 Comment("SPREAD =" + (Ask - Bid));
Files:
s.jpg  335 kb
 
Comment("SPREAD =" + DoubleToString(Ask - Bid,Digits));
 

You can achieve the same result with this

Comment("Spread = ", MarketInfo(NULL, MODE_SPREAD));
 

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?

 
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.

 
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.
Reason: