TradeZoro
Notifications

Reference

General

Core helpers: testing for missing values and changing types.

bool(x)

Converts to bool (na and 0 are false).

Returns: true or false

ParameterType
xany

color(x)

Casts to color.

Returns: a color

ParameterType
xany

fixnan(x)

The last non-na value of x. Call on every bar: it keeps its own running memory.

Returns: the same type as the first argument

ParameterType
xany

float(x)

Converts to a float.

Returns: a number

ParameterType
xany

int(x)

Converts to a whole number (truncates toward zero).

Returns: a whole number

ParameterType
xany

na(x)

True if x is na (missing).

Returns: true or false

ParameterType
xany

nz(x, replacement=0)

x, or replacement when x is na.

Returns: the same type as the first argument

ParameterTypeNotes
xany
replacementanyDefault 0

string(x)

Converts to text.

Returns: text

ParameterType
xany

timestamp(year, month, day, hour=0, minute=0, second=0)

Time in ms (UTC) for a date.

Returns: a whole number

ParameterTypeNotes
yearint
monthint
dayint
hourintDefault 0
minuteintDefault 0
secondintDefault 0

Education only. Not financial advice. Examples are teaching samples, not trading results.

Zscript is coming soon

The manual opens when Zscript launches.

Back to home