Skip to content
Algo Trade Analytics Docs

syminfo.prefix() - Pine Script Function

Returns exchange prefix of the symbol, e.g. “NASDAQ”.

syminfo.prefix(symbol) → simple string
NameTypeDescription
symbolsimple stringSymbol. Note that the symbol should be passed with a prefix. For example: “NASDAQ:AAPL” instead of “AAPL”.

Returns exchange prefix of the symbol, e.g. “NASDAQ”.

  • The result of the function is used in the ticker.new/ticker.modify and request.security.
//@version=6
indicator("syminfo.prefix fun", overlay=true)
i_sym = input.symbol("NASDAQ:AAPL")pref = syminfo.prefix(i_sym)tick = syminfo.ticker(i_sym)t = ticker.new(pref, tick, session.extended)s = request.security(t, "1D", close)
plot(s)