security¶
- security(ticker_id, resolution)¶
- Parameters
ticker_id (
integer
) – The ID of the ticker. The ID can be retrieved using theget_ticker_id(ticker)
.resolution (
string
) – The resolution of the returned security. See description for the possible values.
- Returns
A lua table.
Returns a set of
series
which represents the given ticker at the resolution.The retuned table contains the following fields of the type
series
:{ close, open, high, low, volume, open_time, close_time }
Possible values for the resolution are:
"1s"
,"5s"
,"10s"
,"15s"
,"30s"
,"1m"
,"2m"
,"5m"
,"10m"
,"15m"
,"30m"
,"1H"
,"2H"
,"4H"
,"8H"
,"12H"
,"1D"
,"1W"
,"1M"
,"1Y"
.Example:
sec = security (current_ticker_id, "1s") plot(sec.close)