MQL4 - automated forex trading   /  

Forum

Getting point spread

Back to topics list To post a new topic, please log in or register

avatar
16
karan 2006.05.12 22:39 
I am using the following to compute the spread in points for the current chart:

string symbol = Symbol(); // Get chart symbol
int spread = MarketInfo(symbol,MODE_SPREAD);

spread is being set to 0. I have verified that symbol is valid (set to "EURUSD").

What s wrong with the above?


Changing the External Parameters of MQL4 Programs without Restarting

Changing the External Parameters of MQL4 Programs without Restarting

The article describes a method of changing the external parameters of MQL4 programs on-the-fly, without restarting.


avatar
Moderator
5198
stringo 2006.05.13 23:49 

Interbank FX?

In such case use substraction Ask - Bid


avatar
2077
vixenme 2006.05.15 11:03 
use this : it works

int spread = MathRound((Ask-Bid)/Point);

avatar
309
sx_ted 2006.05.15 15:27 

The function MarketInfo returns a value of type double.

double dDealingSpread=MarketInfo(Symbol(), MODE_SPREAD);

Print("dDealingSpread=",dDealingSpread);


double dDigits=MarketInfo(Symbol(),MODE_DIGITS);
Print("dDigits=",dDigits);

it is the samples in the documentation which are in error.


avatar
2
itvndesign 2006.09.12 07:47 

How to get current price when you mouse move to the point on moving average.
Back to topics list  

To add comments, please log in or register