Sidechair

syminfo.sector

Browse the reference

The sector the company belongs to, such as Technology Services, as a string; na for non-stock symbols.

Try it in the editor

syminfo.sector is a simple string with the broad market sector of the company. It is a fundamentals value: it is na when the symbol has no company behind it (an index, a pair, a future) or when the data feed has no classification for it.

Sectors group industries. Use syminfo.industry for the narrower label inside the sector.

Type

simple string

Remarks

  • Always test with na() before comparing. A comparison with na is false, so a missing sector quietly passes as a different one.
  • On Sidechair: not supported yet; a script that reads syminfo.sector stops with the error "syminfo.sector" isn't supported yet.

Example

Pine ScriptSector tagOpen in editor
//@version=6
indicator("Sector", overlay = true)
plot(close, "Close", color.gray)
if barstate.islast
    label.new(bar_index, high, na(syminfo.sector) ? "no sector" : syminfo.sector)

See also

Not on Sidechair yet