Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
EXCHANGE
ORDER_STATE
ORDER_TYPE
ORDER_CONDITION_TYPE
POSITION_DIRECTION
ORDER_OFFSET
PERIOD
LOG_TYPE
Conventions
Exchanges

The exchange objects exchange and exchanges, and the constant groups for order status, order side, conditional order type, position direction, open/close, K-line period and log type.

Each constant group's page has a table of constants, values and meanings; constants are numbers and can be compared directly with structure fields, for example order.Status == ORDER_STATE_CLOSED.

In this sectionRead the whole section

NameDescription
EXCHANGE (2)The first exchange object added in the robot or backtest configuration is exchange; exchanges is the array of all exchange objects in the order they were added,…
ORDER_STATE (4)Order status constants: the values of the Status field of the Order structure; compare against them to tell whether an order is done.
ORDER_TYPE (3)Order direction constants, i.e.
ORDER_CONDITION_TYPE (4)Conditional order type constants: the values of the ConditionType field of the Condition structure, used when creating, modifying and querying conditional order…
POSITION_DIRECTION (2)Position direction constants: the values of the Type field of the Position structure.
ORDER_OFFSET (2)Open/close constants: the values of the Offset field of the Order structure.
PERIOD (13)K-line period constants.
LOG_TYPE (3)Log type constants: the values of the orderType argument of exchange.Log, choosing a buy, sell or cancel log (it only writes a log; no order is placed).