Download MetaTrader 5
MQL5 ReferenceMarket InfoMarketBookAdd 

MarketBookAdd

Provides opening of Depth of Market for a selected symbol, and subscribes for receiving notifications of the DOM changes.

bool  MarketBookAdd(
   string  symbol      // symbol
   );

Parameters

symbol

[in] The name of a symbol, whose Depth of Market is to be used in the Expert Advisor or script.

Return Value

The true value if opened successfully, otherwise false.

Note

Normally, this function must be called from the OnInit() function or in the class constructor. To handle incoming alerts, in the Expert Advisor program must contain the function void OnBookEvent(string& symbol).

See also

Structure of Depth of Market, Structures and Classes


Updated: 2015.12.03