syminfo namespace
syminfo
Section titled “syminfo”Overview
Section titled “Overview”syminfo provides read-only properties describing the symbol the script runs on: exchange, base currency, point value, tick size, session hours, and more. These fields help you adapt risk sizing, label content, or cross-market logic without hard-coding instrument details.
All `syminfo.*` values are simple, meaning they remain constant during the script run. You can safely assign them to var variables without worrying about bar-by-bar changes.
Common properties
Section titled “Common properties”| Property | Description |
|---|---|
syminfo.ticker / syminfo.tickerid | Symbol without / with exchange prefix (use tickerid for requests). |
syminfo.prefix / syminfo.root | Exchange prefix and futures root symbol. |
syminfo.currency / syminfo.basecurrency | Quote currency (e.g., "USD") and base currency for FX pairs. |
syminfo.mintick / syminfo.minmove | Minimum price increment for the instrument. |
syminfo.pointvalue | Monetary value of one whole price point. |
syminfo.session / syminfo.timezone | Trading hours string and exchange timezone. |
syminfo.type | Instrument type ("stock", "futures", "crypto", etc.). |
Remarks
Section titled “Remarks”- Use
syminfo.mintickwhen normalising stop distances or formatting price outputs to ensure compatibility across tick sizes. syminfo.pointvalueis especially helpful for futures: multiplying change (in points) bypointvalueyields currency profit/loss.- When calling
request.*()helpers, passsyminfo.tickeridto retrieve data for the active chart even if the user swaps symbols.
Example
Section titled “Example”//@version=5indicator("syminfo summary", overlay=true, max_labels_count=1)
tickSize = syminfo.mintickpointValue = syminfo.pointvalue
labelText = str.format( "{0}\nType: {1}\nTick: {2}\nPoint: {3}", syminfo.tickerid, syminfo.type, str.tostring(tickSize), str.tostring(pointValue))
if barstate.islast label.new(bar_index, high, text=labelText, style=label.style_label_left, textcolor=color.white, bgcolor=color.new(color.blue, 70))