For current chart, use this karan:
int spread = (Ask - Bid) / Point;
scorpion:
For current chart, use this karan:
For current chart, use this karan:
int spread = (Ask - Bid) / Point;
Thanks Scorpion.
Do you or anyone else on this forum know of a way to pass MQL4 strings by reference to a DLL written in C?
I looked at the ExpertSample.dll but it is not of much help.
I'm not sure but someone suggested this:
#import "your.dll"
int yourmethod(string& some_string);
#import
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
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 is wrong with the above?