Available translations

Target Size In Base Asset

foundations.png
target-size-in-base-asset.png
Target size in base asset is used to define the size of the position, denominating it in the base asset.
Content
The system supports defining the size of the position in either asset involved in the market: the base asset, or the quoted asset, as per the exchange listing of the market.
The target size may be defined in one of the two assets only, to avoid inconsistencies.
The target size is the maximum size the position may achieve. That is, the definition of the target size is used as a cap for the total size of orders that may be placed during the open stage.
If you prefer to define the size of the position denominated in the base asset, then use this node and delete the target size in quoted asset node.
Even though the definition of the target size is denominated in one of the two assets in the market, the system keeps track of accounts for both assets. That is, performance metrics such as profit loss, ROI, hit ratio, or the annualized rate of return are calculated both based on the base asset and the quoted asset. In fact, metrics are also calculated in a consolidated manner, taking into account both assets at the same time.
All of this information is made available for multiple contexts, for instance, for each position or the whole episode, through the data structure of the trading engine.
When tracking the results of your trading operation, make sure you refer to the set of accounts that make sense for your trading system. This will all become clearer once you read about the trading engine and the layer managers available on the charts.

Examples

If you are trading the whole balance assigned to the trading system on each position, then your target size will look like this:
tradingEngine.tradingCurrent.tradingEpisode.episodeBaseAsset.balance.value
... or...
tradingEngine.tradingCurrent.tradingEpisode.episodeQuotedAsset.balance.value
If you are not trading the entire balance on each position, then you may define the target size as a percentage of the balances, or in any other way you may see fit. For such cases, the following formula may be of use for the close stage target size:
tradingEngine.tradingCurrent.strategyOpenStage.stageBaseAsset.sizeFilled.value - tradingEngine.tradingCurrent.strategyOpenStage.stageBaseAsset.feesPaid.value
Of course, you may need to adjust the above to use stageBaseAsset or stageQuotedAsset, as required. In short, the formula returns the amount of the asset obtained by the transactions triggered during the open stage, minus the fees (and slippage, which is already subtracted from the size filled).
Target Size In Base Asset Menu
The Target Size In Base Asset node has the following Node Menu items:
The Add Formula menu item has the following properties:
  • action: Add UI Object
  • disableIfPropertyIsDefined: true
  • propertyToCheckFor: formula
  • label: Add Formula
  • actionFunction: payload.executeAction
  • actionProject: Visual-Scripting
  • relatedUiObjectProject: Foundations
The Add Ask Portfolio Manager menu item has the following properties:
  • action: Add UI Object
  • label: Add Ask Portfolio Manager
  • disableIfPropertyIsDefined: true
  • propertyToCheckFor: askPortfolioFormulaManager
  • relatedUiObject: Ask Portfolio Formula Manager
  • actionFunction: payload.executeAction
  • relatedUiObjectProject: Portfolio-Management
  • actionProject: Visual-Scripting
The Add Outgoing Signals menu item has the following properties:
  • action: Add UI Object
  • actionProject: Visual-Scripting
  • disableIfPropertyIsDefined: true
  • propertyToCheckFor: outgoingSignals
  • actionFunction: payload.executeAction
  • label: Add Outgoing Signals
  • relatedUiObjectProject: Trading-Signals
The Add Incoming Signals menu item has the following properties:
  • action: Add UI Object
  • actionProject: Visual-Scripting
  • disableIfPropertyIsDefined: true
  • propertyToCheckFor: incomingSignals
  • actionFunction: payload.executeAction
  • label: Add Incoming Signals
  • relatedUiObjectProject: Trading-Signals
The Delete menu item has the following properties:
  • action: Delete UI Object
  • actionProject: Visual-Scripting
  • askConfirmation: true
  • confirmationLabel: Confirm to Delete
  • label: Delete
  • iconPathOn: delete-entity
  • iconPathOff: delete-entity
  • actionFunction: payload.executeAction
Target Size In Base Asset Children
The Target Size In Base Asset node has the following childrenNodesProperties:
The Formula node property features the following properties:
  • name: formula
  • type: node
  • autoAdd: true
The Ask Portfolio Formula Manager node property features the following properties:
  • name: askPortfolioFormulaManager
  • type: node
  • childType: Ask Portfolio Formula Manager
The Outgoing Signals node property features the following properties:
  • name: outgoingSignals
  • type: node
  • project: Trading-Signals
The Incoming Signals node property features the following properties:
  • name: incomingSignals
  • type: node
  • project: Trading-Signals
Target Size In Base Asset Attaching Rules
The following are the Node Attaching Rules that govern the attachment of Target Size In Base Asset with other nodes:
Compatible Types: