Skip to main content

security

Syntax Format

security(ticker_id, resolution)

Overview

The security function provides the data on the financial security according to the given ticker ID and resolution. This function can be useful when analyzing the data of several trading securities and/or different resolution timeframes.

Parameters

ParameterTypePurpose
ticker_idintegerThe ID of the ticker. It can be retrieved, using the get_ticker_id function. Current_ticker_id is a special value that can be used to get the ID of the current asset (to which the indicator will be applied).
resolutionstringThe timeframe resolution for the returned security. More information on resolution is here.

Returns: a table with series.

The possible values of the returned series are:

{
close,
open,
high,
low,
volume,
open_time,
close_time
}

Example

security_data = security(current_ticker_id, "5s")

plot(security_data.close)