Available translations

User Defined Code

foundations.png
user-defined-code.png
You can use this node to inject your own executable code into the Trading System. The exact moment when this code will be run depends on its config properties. From your code you can access the Trading Engine, read and modify it's values, modifying the standard behaviour of the Trading Bot.
Configuration
Initial Values
These are the Initial Values for User Defined Code configuration:
 {
    "runWhenEnteringStage": false,
    "runWhenExitingStage": false,
    "runWhileAtStage": false,
    "whileAtStageWhenToRun": "first|last"
}
Examples
This is a list of properties featured by the User Defined Code configuration. Expanding a property shows sample values for the property extracted from the current Workspace.
User Defined Code Menu
The User Defined Code node has the following Node Menu items:
The Configure menu item has the following properties:
  • action: Configure
  • actionFunction: uiObject.configEditor.activate
  • label: Configure
  • iconPathOn: configuration
  • iconPathOff: configuration
The Add Code menu item has the following properties:
  • action: Add UI Object
  • propertyToCheckFor: javascriptCode
  • label: Add Code
  • actionFunction: payload.executeAction
  • actionProject: Visual-Scripting
  • relatedUiObjectProject: Foundations
The Delete menu item has the following properties:
  • action: Delete UI Object
  • actionProject: Visual-Scripting
  • askConfirmation: true
  • confirmationLabel: Confirm to Delete
  • actionFunction: payload.executeAction
  • label: Delete
  • iconPathOn: delete-entity
  • iconPathOff: delete-entity
User Defined Code Children
The User Defined Code node has the following childrenNodesProperties:
The Javascript Code node property features the following properties:
  • name: javascriptCode
  • type: array
  • autoAdd: true
User Defined Code Attaching Rules
The following are the Node Attaching Rules that govern the attachment of User Defined Code with other nodes:
Compatible Types: