This function is for obtaining the higher bid, the lower ask and the spread between them.

MT5.BidAskSpread(sSymbol)

Arguments

sSymbol

character; target symbol.

Value

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

  • sSymbol {character}: symbol used.

  • fBid {numeric}: higher bid.

  • fAsk {numeric}: lower ask.

  • Spread {numeric}: difference between lower ask and higher bid.

Details

For same result, use MT5.BidAskBook() and calculate the difference between the best bid and ask.

For Forex brokers this function will return an empty data.frame.

References

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

See also