serfadeveloper:
Did you use the MarketBookAdd() function?
I'm new to metatrader 5 and MQL I was wondering if someone knew what was necesary to do in order to be able to use Market depth information?
Yes I used it. So far what i think it might be is that i need to be in the exchange execution mode but i still don't know what does that means in terms of what needs to be done or if it depends on the type of account.
Is this mode established by the broker? type of account?
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
- www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5
serfadeveloper:
Yes, you need a broker who provides symbols with Market Depth. Is this mode established by the broker? type of account?

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
I'm new to metatrader 5 and MQL I was wondering if someone knew what was necesary to do in order to be able to use Market depth information?
I also tried using MarketBookGet() on and EA using the example in the docsMqlBookInfo priceArray[];
bool getBook=MarketBookGet(NULL,priceArray);
if(getBook)
{
int size=ArraySize(priceArray);
Print("MarketBookInfo about ",Symbol());
}
else
{
Print("Failed to receive DOM for the symbol ",Symbol());
}
having put MarketBookAdd() in the OnInit() function. But it always goes to the part of Failed to receive DOM
I also read that it had to be in exchange execution mode how do I do that?
Im new to MQL thanks in advance for your help.