![]() | Position is the section of the data structure that keeps track of information within the scope of each position, and during the time a position is open. |
The position node is available both in the current context and the last context, that is, you may retrieve information of the position that was last opened or the one currently open.
A position is open from the instant the take position event is triggered until the instant the close stage is closed. Therefore, this section of the data structure features information spaning those periods only.
In this section of the hierarchy, you have access to:
-
balances and position performance metrics denominated in both the base and quoted assets;
-
counters, such as the number of periods the position has been open;
-
statistics, such as performance metrics consolidating both assets, or user-defined statistics;
-
the distance to certain events, such as the number of candles to the last take position event, or the last create order event;
-
rates describing each candle in the episode, such as the open, close, min and max rates;
- a few more concepts inherent to positions such as entry and exit target rates, entry and exit sizes accounted for each asset, and stop loss and take profit targets—all of these covered below.
Entry and Exit Target Rates
![]() | Entry target rate is the target rate set on the initial targets definition, in the open stage of the strategy. |
![]() | Exit target rate is the target rate set on the initial targets definition, in the close stage of the strategy. |
Refresh this concepts by reading about the initial target definitions at the trading system.
Entry and Exit Target Sizes
![]() | Entry target size is the target size set on the initial targets definition, in the open stage of the strategy. |
![]() | Exit target size is the target size set on the initial targets definition, in the close stage of the strategy. |
Both entry and exit target sizes may be defined either denominated in the base asset or the quoted asset. Nevertheless, the sytem keeps track of target sizes in both assets. If the target is defined denominated in the base asset, then the target for the quoted asset is calculated using the current rate, and viceversa.
Refresh this concepts by reading about the initial target definitions at the trading system.
Stop Loss
![]() | Stop loss is the current stop loss target, as defined in the manage stage of the corresponding strategy. |
Stop Loss Phase
![]() | Stop loss phase is the numeric value of the phase that is currently open, and thus, defining the value of the stop loss. |
Stop Loss Position
![]() | Stop Loss position indicates if the stop loss target is above or below the position rate. |
Possible values are Above
and Below
.
The implications of setting the stop loss target above or below the position rate are explained on the trading system section of the documentation, in particular while describing the initial target rate definition.
Take Profit
![]() | Take profit is the current take profit target, as defined in the manage stage of the corresponding strategy. |
Take Profit Phase
![]() | Take profit phase is the numeric value of the phase that is currently open, and thus, defining the value of the take profit. |
Take Profit Position
![]() | Take profit position indicates if the take profit target is above or below the position rate. |
Possible values are Above
and Below
.
The implications of setting the take profit target above or below the position rate are explained on the trading system section of the documentation, in particular while describing the initial target rate definition.