Description Usage Arguments Details Value Author(s) References See Also Examples
Function to load sSymbol
in Data.frame
or xts
if specified. All the data come from socket. It's pretty quickly function to obtain data.
Data is loaded silently and will take longer as defined iRow
is.
1 | MT5.Quick_GetSymbol(sSymbol, iTF, iRows = 5, xts = FALSE)
|
sSymbol |
character; target symbol. |
iTF |
int; target time frame. See details. |
xts |
bool; if |
iRow |
int; how many rows. It's start from last. (default: |
It should be used only for tiny table sizes. For big size tables consider to use MT5.GetSymbol()
instead.
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
Always returns OHCLV
format. Date will be exhibited as it xts
parameter is defined.
xts = FALSE
(default)Returns [nx10] {data.frame} {Year, Month, Day, Hour, Minute, Open, High, Low, Close, Volume}
xts = TRUE
Returns [nx5] {xts} {Open, High, Low, Close, Volume}
On failure attempts it will return a empty data.frame
.
Guilherme Kinzel, guikinzel@gmail.com
https://en.wikipedia.org/wiki/Open-high-low-close_chart
https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes
MT5.GetSymbol()
, MT5.QuickLastRow_GetSymbol()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
MT5.Quick_GetSymbol("EURUSD", iTF = 5, iRows = 3)
## Returns
## Year Month Day Hour Minute Open High Low Close Volume
## 1 2020 12 11 1 5 1.21411 1.21414 1.21405 1.21409 39
## 2 2020 12 11 1 10 1.21408 1.21419 1.21404 1.21418 56
## 3 2020 12 11 1 15 1.21421 1.21421 1.21405 1.21408 63
MT5.Quick_GetSymbol("EURUSD", iTF = 5, iRows = 3, xts = TRUE)
## Returns
## Open High Low Close Volume
## 2020-12-11 01:05:00 1.21411 1.21414 1.21405 1.21409 39
## 2020-12-11 01:10:00 1.21408 1.21419 1.21404 1.21418 56
## 2020-12-11 01:15:00 1.21421 1.21421 1.21405 1.21415 82
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.