Variables
syminfo.currency
Returns a string containing the code representing the currency of the symbol's prices. For example, this variable returns "USD" for "NASDAQ:TSLA" and "JPY" for "USDJPY".
Example
indicator(title="Currency Background Example", overlay=true)
currency = syminfo.currency
bgColor = currency == "USD" ? color.new(color.blue, 0.2) : currency == "JPY" ? color.new(color.red, 0.2) : color.new(color.gray, 0.2)
bgcolor(bgColor)
plot(close)
Type
simple string