Sidechair

syminfo.root

Browse the reference

The root of a derivative's symbol, such as ES for the futures contract ESZ2025; the same as the ticker for other symbols.

Try it in the editor

syminfo.root is a simple string. For a futures or options symbol it is the underlying family name shared by every expiry, so ES covers ESH2026, ESM2026 and the continuous ES1!. For a stock or a pair it is the same as syminfo.ticker.

Use it when a rule belongs to the product rather than to one contract, for example a per-product tick value table.

Type

simple string

Remarks

  • syminfo.current_contract names the specific contract behind a continuous futures chart.
  • On Sidechair: the value is the symbol itself, the same as syminfo.ticker.

Example

Pine ScriptProduct-level settingOpen in editor
//@version=6
indicator("Product rule", overlay = true)
isEs = syminfo.root == "ES"
len = isEs ? 50 : 20
plot(ta.sma(close, len), "SMA", color.blue)
if barstate.islast
    label.new(bar_index, high, "root " + syminfo.root + ", length " + str.tostring(len))

See also

Runs on Sidechair