Your code works for me with Alpari-MT5 server.
I suggest you to modify this line of code :
Print("Failed to receive DOM for the symbol ",Symbol()," error : ",GetLastError());
That can eventually give you more information.
Thanks for testing it!
Have you tested it on a live or a demo account?
Okay, I have tested it again on a different machine and indeed it now works. So it might be a corrupted MT5 installation. When I am back from work I will test your suggestion.
Okay, I have tested it again on a different machine and indeed it now works. So it might be a corrupted MT5 installation. When I am back from work I will test your suggestion.
Please observe which MT5 version you're using... according to this post on the Portuguese Section, a small bug was introduced with Build 965, which made the MarketBookGet() function to return false all the time.
I've written to MQ's Service Desk and, as I've already tested, this bug was already corrected on Build 975.
So, the only thing you have to do is to update your MT5 version.
I hope it helps.
Malacarne
Please observe which MT5 version you're using... according to this post on the Portuguese Section, a small bug was introduced with Build 965, which made the MarketBookGet() function to return false all the time.
I've written to MQ's Service Desk and, as I've already tested, this bug was already corrected on Build 975.
So, the only thing you have to do is to update your MT5 version.
I hope it helps.
Malacarne
Thanks for your answers. You are correct that I tested it on Build 975 - that's were it failed.
All other builds seem to work correctly regarding this bus.
Thanks again.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear all,
I was recently trying out the new MT5/MQL5 features about accessing the Depth of Market infortmation programatically. However, I do have a question.
I currently have an account by a broker starting with A*****. Unfortunately, this acc can only be used using MT4. For testing purposes I opened a Demo Account to use it with MT5 and read out DoM information.
I do understand that DoM information must be provided by the broker to be accessible, so I checked that and confirmed that the information is there - at least within the GUI (see screenshot)
So I tried accesing the information in an EA using the following code:
However, it seems that the information is not accesible:
So my question is:
Is it possible, that the programatically access on the DoM information is prohibited explicitly (from the broker), although the information is accessible from the Terminal GUI?
Thanks in advance