Keep track of how many instances of certain objects have existed in a given context. On this page: Periods, Strategies, Positions, Orders, and Days.

A counter keeps track of how many instances of certain objects have come to exist—or have taken a certain value—during the duration of a certain context.

For example, how many positions have been open during an episode, or how many of those positions have been hits.

Counters are kept in multiple contexts simultaneously. In particular, you will find episode counters, strategy counters, position counters, and order counters.

Counter-specific Nodes

Periods

Periods counts the number of candles that have been evaluated, in the context of the parent node.

Strategies

Strategies counts the number of times strategies have been triggered-on, in the context of the parent node.

Positions

Positions counts the number of times positions have been opened, in the context of the parent node.

Orders

Orders counts the number of times orders have been placed, in the context of the parent node.

Days

Days counts the number of days through which the trading bot has cycled since the object represented by the parent node was open.

In the context of an episode, it counts the number of days in the episode.

In the context of a position, it counts the number of days a position has been open.

Episode Counters

The episode counters node features counters of instances of objects that come to exist during the duration of the episode.

Episode Counters

Periods

Strategies

Positions

Orders

Hits

Fails

User Defined Counters

Strategy Counters

The strategy counters node features counters of instances of objects that come to exist while the strategy is open.

Strategy Counters

Periods

Position Counters

The position counters node features counters of instances of objects that come to exist during the duration of the position.

Position Counters

Periods

Order Counters

The order counters node features counters of instances of objects that come to exist while the order is open.

Order Counters

Periods