This function is for obtaining Bid or Ask order book with specified book depth.

MT5.BidAskBook(sSymbol, iBidAsk = 0, iBookDepth = 5)

Arguments

sSymbol

character; target symbol

iBidAsk

int; if iBidAsk = 0 Bid is given, iBidAsk = 1 Ask is given (default 0).

iBookDepth

int; book depth (default 5)

Value

Data.frame \([nx2]\) is returned, with follow informations:

  • fPrice {numeric}: price

  • Volume {int}: bid/ask grouped by price

(Stocks market) If its returns a line with fPrices = 0 the market is in auction. Check references.

(Stocks market) In auctions this function cannot reflect the book properly.

References

https://www.investopedia.com/terms/o/order-book.asp https://www.investopedia.com/terms/a/auctionmarket.asp

See also