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
| Name | Type | Holds |
|---|---|---|
syminfo.ticker | simple string | The instrument’s ticker |
syminfo.symbol | simple string | The instrument’s symbol |
syminfo.root | simple string | The instrument’s root |
syminfo.exchange | simple string | The exchange |
syminfo.segment | simple string | The segment |
syminfo.currency | simple string | The currency |
syminfo.asset_type | simple string | The asset type |
syminfo.timezone | simple string | The instrument’s timezone |
syminfo.isindex | simple bool | Whether the instrument is an index |
syminfo.mintick | simple float | The minimum tick |
syminfo.minmove | simple float | The minimum move |
syminfo.mincontract | simple int | The minimum contract |
syminfo.pricescale | simple int | The price scale |
syminfo.sizescale | simple int | The 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.
Related pages
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.