The base currency of a pair, such as EUR in EURUSD or BTC in BTCUSD.
syminfo.basecurrency is a simple string with the currency code you buy or sell in a pair. For EURUSD it is EUR; the quote currency, USD, is syminfo.currency.
It is meaningful for forex and crypto pairs. For a symbol that is not a pair, treat the value as informational and do not build logic on it.
Type
simple string
Remarks
- Together with
syminfo.currencyit tells you which two currencies a pair connects. - On Sidechair: crypto symbols give the part before the first dash or slash, so BTC-USD gives BTC. Every other symbol, forex included, gives USD.
Example
//@version=6
indicator("Pair", overlay = true)
plot(close, "Close", color.gray)
if barstate.islast
label.new(bar_index, high, syminfo.basecurrency + " / " + syminfo.currency)See also
Runs on Sidechair