Skip to main content

get_ticker_id

Syntax Format

get_ticker_id(ticker)

Overview

The get_ticker_id function retrieves the ID of the given ticker*, which represents a trading instrument on the platform. This function is useful once the data of another trading instrument is needed other than the one currently open.

*If the ticker is not found – the function returns nil.

Parameters

ParameterTypePurpose
tickerstringInput ticker, for which an ID is required

Returns: integer.

Example

local ticker_id = get_ticker_id("EURUSD")