Sidechair

syminfo.prefix

Browse the reference

The exchange prefix of the chart's symbol, the text before the colon in an id such as NASDAQ:AAPL.

Try it in the editor

syminfo.prefix is a simple string: the part of syminfo.tickerid before the colon. It identifies where the data comes from, which matters when the same ticker trades on several venues.

The function syminfo.prefix(symbol) returns the same part for any ticker id you give it.

Type

simple string

Remarks

  • The prefix is data-source specific. Avoid hard-coding a comparison against it in a script you share.
  • On Sidechair: the value is always an empty string, even when the symbol's name starts with a prefix.

Example

Pine ScriptShow the full id and the prefixOpen in editor
//@version=6
indicator("Prefix", overlay = true)
plot(close, "Close", color.gray)
if barstate.islast
    label.new(bar_index, high, "[" + syminfo.prefix + "] " + syminfo.ticker)

See also

Runs on Sidechair