The exchange prefix of the chart's symbol, the text before the colon in an id such as NASDAQ:AAPL.
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
//@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