Sidechair

syminfo.ticker()

Browse the reference

Returns the symbol name of a ticker id you pass, without its exchange prefix, so "NASDAQ:AAPL" gives AAPL.

Try it in the editor

syminfo.ticker(symbol) strips the prefix from any ticker id. It is the function form of the syminfo.ticker variable, which answers for the current symbol only.

Use it to show a clean name for a symbol taken from input.symbol, or to compare a requested symbol against a typed name.

Syntax

Pine Script
syminfo.ticker(symbol: simple string) -> simple string
syminfo.ticker(symbol: series string) -> series string

Arguments

NameTypeDefaultDescription
symbolsimple/series stringrequiredA ticker id, usually with a prefix before a colon, such as "NASDAQ:AAPL" or syminfo.tickerid.

Returns

simple/series string: The text after the colon of the ticker id.

Remarks

  • Pass a series string when the id changes bar to bar; the result is then a series string.
  • On Sidechair: not supported yet; the call warns that syminfo.ticker() isn't supported yet and returns na, and the rest of the script keeps running. Use the syminfo.ticker variable for the chart's own symbol.

Example

Pine ScriptBare name of the chart symbolOpen in editor
//@version=6
indicator("Name of an id", overlay = true)
name = syminfo.ticker(syminfo.tickerid)
plot(close, "Close", color.gray)
if barstate.islast
    label.new(bar_index, high, na(name) ? syminfo.ticker : name)

See also

Not on Sidechair yet