Instrument properties

The syminfo values describe the instrument your script is running on. There are fourteen of them: eight strings, one boolean, two floats and three ints.

Every one is simple rather than series. An instrument property is fixed for the whole run of a script; it does not change from bar to bar the way a price does. So you can read one once and treat the answer as settled.

Every one also defaults to na. Where a property is unknown, you read na rather than an empty string or a zero. That is worth knowing before you use a property in arithmetic or in a comparison.

Names and types

NameTypeHolds
syminfo.tickersimple stringThe instrument’s ticker
syminfo.symbolsimple stringThe instrument’s symbol
syminfo.rootsimple stringThe instrument’s root
syminfo.exchangesimple stringThe exchange
syminfo.segmentsimple stringThe segment
syminfo.currencysimple stringThe currency
syminfo.asset_typesimple stringThe asset type
syminfo.timezonesimple stringThe instrument’s timezone
syminfo.isindexsimple boolWhether the instrument is an index
syminfo.minticksimple floatThe minimum tick
syminfo.minmovesimple floatThe minimum move
syminfo.mincontractsimple intThe minimum contract
syminfo.pricescalesimple intThe price scale
syminfo.sizescalesimple intThe size scale

Using one in a calculation

A simple value can stand wherever a series value is expected, so you can mix an instrument property into an expression built from prices. The result is a series, because one of its parts is.

indicator("Bar range in ticks")
plot((high - low) / syminfo.mintick)

The plot call sits at the top level of the script. Chart-output functions have to be called there.

The chart’s interval is not a syminfo value. It has its own names, and they are also simple; see Sessions and intervals. For why the simple and series split runs the way it does across this section, see Data availability by market.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade