NexuScript 1.5
Symbol and timeframe
Facts about the chart's symbol and bar size. Fixed for a run, so they may be read in setup.
NQZ6.symbol.rootThe product code of the chart's symbol without the contract month, such as NQ.symbol.exchangeThe exchange the chart's symbol trades on, such as CME.symbol.descriptionThe full name of the chart's symbol, such as E-mini Nasdaq-100.symbol.tickThe smallest step the price can move, such as 0.25 for NQ.symbol.point_valueHow much money a move of 1.0 in price is worth on one contract.symbol.qty_stepThe smallest step an order size can take.symbol.timezoneThe time zone of the exchange the symbol trades on.symbol.sessionThe trading hours of the symbol, as a time window.timeframe.nameThe chart's bar size, written as text.timeframe.secondsHow long one bar of the chart lasts, in seconds.timeframe.intradayTests whether the chart's bars are shorter than one day.symbol.contractThe contract shown on the chart, such as NQZ6.symbol.asset_classWhat kind of market the symbol is: futures or perpetuals.symbol.tick_valueHow much money one tick is worth on one contract.symbol.currencyThe currency the symbol's prices and money values are in, such as USD.symbol.min_qtyThe smallest order size allowed.symbol.expiryWhen the chart's contract expires.symbol.rollWhen trading is expected to move from the chart's contract to the next one.symbol.funding_hoursHow many hours pass between a perpetual's funding payments.The full ticker of the chart's symbol, such as NQZ6.
Syntax
symbol.ticker::StringReturns
String The ticker as text, contract month included.
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the feed does not give one.
Example
if bar.last
table([["Ticker", symbol.ticker]])
endSee also
The product code of the chart's symbol without the contract month, such as NQ.
Syntax
symbol.root::StringReturns
String The root as text.
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the feed does not give one.
Example
if bar.last
table([["Product", symbol.root]])
endSee also
The exchange the chart's symbol trades on, such as CME.
Syntax
symbol.exchange::StringReturns
String The exchange code as text.
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the feed does not give one.
Example
if bar.last
table([["Exchange", symbol.exchange]])
endSee also
The full name of the chart's symbol, such as E-mini Nasdaq-100.
Syntax
symbol.description::StringReturns
String The name as text.
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the feed does not give one.
Example
if bar.last
table([["Market", symbol.description]])
endSee also
The smallest step the price can move, such as 0.25 for NQ.
Syntax
symbol.tick::NumberReturns
Number The tick size as a number.
Units and time zones
In price units of the symbol.
Missing values
Example
plot("Bar range in ticks", (high - low) / symbol.tick)See also
How much money a move of 1.0 in price is worth on one contract.
Syntax
symbol.point_value::NumberReturns
Number The value of one full point, such as 20 for NQ.
Details
One tick is worth symbol.tick * symbol.point_value.
Units and time zones
In the symbol's currency, per 1.0 of price, per contract.
Missing values
Fixed for the whole run, so it may be read in setup. missing while the symbol is still loading.
Example
plot("Bar range per contract", (high - low) * symbol.point_value)See also
The smallest step an order size can take.
Syntax
symbol.qty_step::NumberReturns
Number 1 for futures contracts, or a fraction of a coin on a perpetual.
Missing values
Fixed for the whole run, so it may be read in setup. Never missing: it is 1 when the feed does not give a step.
Example
const step = symbol.qty_step
on bar
plot("Order size step", step)
endSee also
The time zone of the exchange the symbol trades on.
Syntax
symbol.timezone::StringReturns
String An IANA zone name, such as America/Chicago.
Details
This is the zone the clock functions use when you leave their zone out or give "".
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the feed does not give one; the clock functions then use UTC.
Example
if bar.last
table([["Exchange zone", symbol.timezone]])
endSee also
The trading hours of the symbol, as a time window.
Syntax
symbol.session::StringReturns
String The hours as "HHMM-HHMM" text, such as "1800-1700".
Units and time zones
On the clock of symbol.timezone.
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the feed does not give one; period.starts("Session") then uses the calendar day.
Example
if session.starts(symbol.session)
marker("Session open", position = "below")
endSee also
The chart's bar size, written as text.
Syntax
timeframe.name::StringReturns
String Minutes as a number in text ("1", "5", "60"), or "D" for daily and "W" for weekly.
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the chart does not say.
Example
if bar.last
table([["Timeframe", timeframe.name]])
endSee also
How long one bar of the chart lasts, in seconds.
Syntax
timeframe.seconds::NumberReturns
Number The bar length, such as 300 for a 5 minute chart or 86400 for a daily chart.
Units and time zones
Seconds.
Missing values
Fixed for the whole run, so it may be read in setup. missing when the chart does not say.
Example
plot("Bar length in minutes", timeframe.seconds / 60)See also
Tests whether the chart's bars are shorter than one day.
Syntax
timeframe.intraday::BoolReturns
Missing values
Fixed for the whole run, so it may be read in setup. false when the chart does not say how long a bar is.
Example
if timeframe.intraday && session.starts("0930-1600", "America/New_York")
marker("Open")
endSee also
The contract shown on the chart, such as NQZ6.
Syntax
symbol.contract::StringReturns
String The contract code as text. When the chart does not say, the same as symbol.ticker.
Missing values
Fixed for the whole run, so it may be read in setup.
Example
if bar.last
table([["Contract", symbol.contract]])
endSee also
What kind of market the symbol is: futures or perpetuals.
Syntax
symbol.asset_class::StringReturns
String "futures", "perps", or empty text when the feed does not say.
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the feed does not say.
Example
if bar.last
table([["Market", symbol.asset_class == "perps" ? "Perpetual" : "Futures"]])
endSee also
How much money one tick is worth on one contract.
Syntax
symbol.tick_value::NumberReturns
Number The money per tick per contract: symbol.tick times symbol.point_value, such as 5 for NQ.
Units and time zones
In the symbol's currency (symbol.currency), per tick, per contract.
Missing values
Fixed for the whole run, so it may be read in setup. missing while the symbol is still loading.
Example
plot("Bar range per contract", (high - low) / symbol.tick * symbol.tick_value)See also
The currency the symbol's prices and money values are in, such as USD.
Syntax
symbol.currency::StringReturns
String The currency code as text, such as "USD" or "USDT".
Missing values
Fixed for the whole run, so it may be read in setup. Empty text when the feed does not say.
Example
if bar.last
table([["Tick value", string(symbol.tick_value) * " " * symbol.currency]])
endSee also
The smallest order size allowed.
Syntax
symbol.min_qty::NumberReturns
Number The minimum size, such as 1 contract for futures or 0.001 of a coin on a perpetual.
Units and time zones
Contracts, or coins on a perpetual.
Missing values
Fixed for the whole run, so it may be read in setup. When the feed gives no minimum, it is symbol.qty_step.
Example
const smallest = symbol.min_qty
on bar
plot("Smallest order", smallest)
endSee also
When the chart's contract expires.
Syntax
symbol.expiry::NumberReturns
Number A time.
Units and time zones
Milliseconds since 1 January 1970 UTC, like time.
Missing values
Fixed for the whole run, so it may be read in setup. missing when the feed does not say, or when the symbol is not a dated contract (a perpetual never expires).
Example
if bar.last
table([["Expires", clock.format(symbol.expiry, "d MMM yyyy")]])
endSee also
When trading is expected to move from the chart's contract to the next one.
Syntax
symbol.roll::NumberReturns
Number A time, usually some days before symbol.expiry.
Units and time zones
Milliseconds since 1 January 1970 UTC, like time.
Missing values
Fixed for the whole run, so it may be read in setup. missing when the feed does not say, or when the symbol is not a dated contract.
Example
plot("Days to the roll", (symbol.roll - time) / 86400000)See also
How many hours pass between a perpetual's funding payments.
Syntax
symbol.funding_hours::NumberReturns
Number The hours between funding payments, such as 8.
Units and time zones
Hours.
Missing values
Fixed for the whole run, so it may be read in setup. missing for futures, and when the feed does not say.
Example
plot("Funding every (h)", symbol.funding_hours)