Available translations
loading results
User Defined Code
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.
Вы можете использовать этот узел для внедрения собственного исполняемого кода в торговую систему Trading System. Точный момент, когда этот код будет запущен, зависит от его свойств конфигурации. Из своего кода вы можете получить доступ к свойствам Trading Engine, прочитать и изменить его значения, изменив стандартное поведение торгового бота 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
- relatedUiObject: Javascript 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
Tip: When a menu item is grayed out, it means that User Defined Code already has the required child type that the menu item may add, and only that child is allowed for that case.
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
- childType: Javascript Code
- 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: