Function to load Times & Sales table from MT5 of target symbol.

Times & Sales table provides in-depth trading data, including records on time, direction, price and volume of executed trades.

Undefined direction transaction appears as N/A in MT5's Times & Sales table. Those transactions are automatically removed by default (bIgnoreNAs = TRUE). See References.

MT5.GetTimesSales(sSymbol, iRows = 10, bIgnoreNAs = TRUE)

Arguments

sSymbol

character; target symbol.

iRows

int; how many rows. It's start from last. (default: 10)

bIgnoreNAs

bool; ignore NA type in Times & Series of MT5 table. See references. (default: TRUE)

Value

Returns Data.frame \([nx4]\), with follow informations:

  • Datetime {POSIXct}: Datetime of trade executed.

  • Type {int}: 0 for Buy trade and 1 for Sell trade.

  • Price {numeric}: Price of trade executed.

  • Volume {int}: Volume of trade executed.

References

https://www.metatrader5.com/en/terminal/help/trading/depth_of_market