Function to load the last row of a specific time frame of a vector of symbols. All the data come from socket connection.

The usage of this function is preferable than use MT5.Quick_GetSymbol() several times for each symbol.

MT5.QuickLastRow_GetSymbol(sSymbols, iTF)

Arguments

iTF

int; target time frame. See details.

sSymbol

character(); vector of target symbols.

Value

Returns \([nx7]\) {data.frame} {Date, sSymbol, Open, High, Low, Close, Volume}.

Details

Supported time frames (iTF). See references for even more details.

  • 1: PERIOD_M1

  • 2: PERIOD_M2

  • 5: PERIOD_M5

  • 15: PERIOD_M15

  • 30: PERIOD_M30

  • 60: PERIOD_H1

  • 120: PERIOD_H2

  • 240: PERIOD_H4

  • 480: PERIOD_H8

  • 1440: PERIOD_D1

  • 7200: PERIOD_W1

  • 216000: PERIOD_MN1

References

https://en.wikipedia.org/wiki/Open-high-low-close_chart

https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes

See also

Examples

if (FALSE) { ## Get last row of EURUSD and GBPUSD, 30 minute timeframe both MT5.QuickLastRow_GetSymbol(c("EURUSD", "GBPUSD"), 30) ## Returns ## Date sSymbol Open High Low Close Volume ## 1 2020-12-11 00:30:00 EURUSD 1.21371 1.21401 1.21370 1.21394 184 ## 2 2020-12-11 00:30:00 GBPUSD 1.33030 1.33032 1.32947 1.32993 866 }