The two-letter country code of the issuer, such as US, as an ISO 3166-1 alpha-2 string.
syminfo.country is a simple string holding the country where the company is domiciled or the instrument is issued, written as a two-letter code: US, GB, DE.
It is na for symbols that have no issuer country, such as crypto pairs and many futures.
Type
simple string
Remarks
- The country of the issuer can differ from the country of the exchange where it trades.
- On Sidechair: not supported yet; a script that reads
syminfo.countrystops with the error "syminfo.country" isn't supported yet. - Compare against uppercase codes: "US" matches, "us" does not.
Example
//@version=6
indicator("Domestic only", overlay = true)
domestic = syminfo.country == "US"
bgcolor(domestic ? na : color.new(color.red, 88))
plot(close, "Close", color.gray)See also
Not on Sidechair yet