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
Hello,
I would like clarification on MQL5's market depth behavior.
I am developing an expert advisor that reads market depth data using MarketBookAdd() and MarketBookGet().
The same diagnostic EA works correctly with other brokers, but it doesn't work on my IC Markets MT5 live account.
environment:
Broker: IC Markets Global
Company: Raw Trading Ltd
Account type: Live MT5
Server: ICMarketsSC-MT5-3
Terminal: MetaTrader 5 IC Markets Global
Terminal manufacturer: 5836
Problem:
You can manually open the Depth of Market window in the MT5 terminal.
However, MQL5 Expert Advisors cannot join the order book.
For EURUSD:
SYMBOL_TICKS_BOOKDEPTH = 0
MarketBookAdd("EURUSD") = false
GetLastError() = 4901 / ERR_BOOKS_CANNOT_ADD
Return MarketBookGet() before MarketBookAdd() succeeds:
MarketBookGet = false
GetLastError() = 4903
I also scanned symbols from several marketwatches:
EURUSD
GBPUSD
USD CHF
USD/JPY
USDCAD
AUDUSD
AUNDNZD
AUDCAD
AUDCHF
AUDJPY
XAUUSD
The results for all these symbols are as follows:
SYMBOL_TICKS_BOOKDEPTH = 0
MarketBookAdd() = false
GetLastError() = 4901
I contacted IC Markets support and specifically asked whether DOM data access via MQL5 APIs through MarketBookAdd() and MarketBookGet() is supported on this live server.
Their response was this:
"Due to ongoing issues with MQL5, please contact MQL5 support if you require further assistance."
Question:
I'm not asking how to code MarketBookAdd() or MarketBookGet(). I want to understand whether these results indicate a broker/server/symbol configuration issue, or an MQL5/terminal issue.
thank you.