Type/to search
Getting Started
Platform Basics
Writing Strategies
Strategy Structure
Programming Languages
Strategy Parameters
Interface Parameter Types
Component Configuration
Save Parameter Settings
Interactive Controls
Strategy Frontend
Template Library
Built-in Libraries
UI Text Localization
API Quick Reference
Development Tools
Backtesting System
Advanced Topics
Data and Research
Extended API Interface

Interface parameters are set in the strategy parameters area below the code editor on the strategy editing page. There are 5 types; the variable names in the table are only examples:

TypeExample variableValue in codeDefault value
Number (number)pNumA number; f64 in RustEnter a number, e.g. 100
Boolean (true/false)pBoolA booleanSet with a switch; cannot be optional
String (string)pStrA stringType it as is, e.g. abc, without quotes
Dropdown (selected)pComboxIndex or bound data of the selected option; an array with multiple selectionSelect one or more options
Encrypted string (string)pSecretStrA stringType it as is, e.g. xyz, without quotes
Settings of a parameter
  • Variable: the name of the parameter's global variable in the strategy code; do not use a reserved word (keyword) of the programming language.
  • Description: the display name of the control bound to the parameter.
  • Remarks: the tooltip shown when the mouse hovers over the parameter's control in the backtest or live robot interface.
  • Default value and "Optional": the "Optional" switch next to the default value is on by default and can be turned off to make the parameter required. A backtest or live robot cannot start if a required parameter is not set.
  • Component configuration: the type of UI control bound to the parameter, plus minimum, maximum, group, filter and so on; see Component Configuration.
Notes
  • Parameters are global variables in the code and can be modified there (except in Rust, where parameters are global constants and cannot be modified).
  • An "Encrypted string" parameter is used the same way as a "String" parameter, but it is sent encrypted, never in plain text.
  • An optional parameter that is left empty is an empty string for String parameters, and a null value for Number, Dropdown and Encrypted string parameters. In Rust strategies it is the zero value of its type: 0 for numbers, an empty string for strings and encrypted strings, false for booleans.
  • A dropdown parameter without "Support multiple selection" in its component configuration holds the index of the selected option, or the option's bound data if data is bound; with "Support multiple selection" it holds an array of the indices (or bound data) of all selected options.