Skip to content

Market Info

Getting Market Information

These are functions intended for receiving information about the market state.

FunctionAction
MarketInfoReturns various data about securities listed in the “Market Watch” window
SymbolsTotalReturns the number of available (selected in Market Watch or all) symbols
SymbolNameReturns the name of a specified symbol
SymbolSelectSelects a symbol in the Market Watch window or removes a symbol from the window
SymbolInfoDoubleReturns the double value of the symbol for the corresponding property
SymbolInfoIntegerReturns a value of an integer type (long, datetime, int or bool) of a specified symbol for the corresponding property
SymbolInfoStringReturns a value of the string type of a specified symbol for the corresponding property
SymbolInfoTickReturns the current prices for the specified symbol in a variable of the MqlTick type
SymbolInfoSessionQuoteAllows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week.
SymbolInfoSessionTradeAllows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week.

What’s new in MQL5

Added the functions for working with the Depth of Market to obtain exchange data. Visually, it is presented as a table of Sell and Buy limit orders for traded assets. The format is the same for currency pairs, stocks, metals and futures.

The Depth of Market featuring orders of market participants is available in the trading platform. The Bid and Ask prices are formed in the Market Depth based on the best orders. These prices are shown in the Market Watch window. Besides, the exchange provides prices and volumes of the last executed deals (Last and Volume). The Last prices are used for creating price charts and for displaying the Time & Sales:

dom_exchange

The new functions allow you to develop strategies based on deals volume and order flow, create a custom Depth of Market for manual trading and carry out automatic analysis in real time.

FunctionAction
MarketBookAddOpen the Depth of Market for a specified symbol and subscribe to receiving the Depth of Market changes
MarketBookReleaseClose the Depth of Market for a specified symbol and unsubscribe from receiving the Depth of Market changes
MarketBookGetReturn the MqlBookInfo array of structures containing data from the specified symbol’s Depth of Market
Last updated on