MarketInfo returns a double. No idea where you are getting that number from. Show your code.
MarketInfo returns a double. No idea where you are getting that number from. Show your code.
Nothing complicated
Print(MarketInfo(Symbol(),MODE_MARGINREQUIRED));
Works 99% of time when changing account returning the margin of the current symbol.
1% of time is returning -92233720368547760
I suspect something like symbol is not yet ready and MarketInfo cannot give the Margin ( despite IsConnected is true ), but this returned value -92233720368547760 is not supposed to happen and does not exist in the official error list.
And GetLastError() reports 0 ( No error )
For now I am using this piece of code as a workaround
while( MarketInfo(Symbol(),MODE_MARGINREQUIRED) < 0 ) RefreshRates();
I've not seen this bug again since I am using MT4 build 1323
I am upgrading to build 1324 today
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
from time to time, when switching account I am encountering a bug using latest MT4 build 1320,
MarketInfo(Symbol(),MODE_MARGINREQUIRED) is returning -92233720368547760 ( = - 0x 147ae 147ae 147b0 )
GetLastError() returns 0 ( no error ), so this negative 0x 147ae147ae147b0 value is not supposed to happen.
I presume this should be a non official error code.
Does anymore know what this value is seen as it should not.
Thank you
Regards