Component Configuration
Both strategy interface parameters and strategy interactive controls have a "Component Configuration" option. It sets the UI control used for the parameter (or interactive control), as well as the minimum, maximum, group, filter and so on.
Components available for each type (the first one is the default):
| Type | Components |
|---|---|
| Number (number) | Input box, time picker, slider |
| Boolean (true/false) | Switch |
| String (string) | Input box, text box, time picker, color picker, currency, trading symbol |
| Dropdown (selected) | Dropdown, segmented control, currency, trading symbol |
| Encrypted string (string), strategy parameters only | Encrypted input box |
| Button (button), interactive controls only | Button (no input) |
Group
Enter a label in the "Group" box of the component configuration to put several strategy parameters in the same group (replacing the platform's old "Strategy Grouping" feature). Interactive controls can be grouped the same way (replacing the old "Interactive Control Grouping" feature).
Filter
In the component configuration of a strategy parameter, the "Filter" box takes a condition expression that controls whether the parameter is available (replacing the platform's old "Parameter Dependency" feature). The filter is empty by default, meaning no filtering; the parameter is available when the condition is true. Expressions such as a > b, a == 1, a, !a and a >= 1 && a <= 10 can be used, for example:
a == 1: available when parameteraequals 1, otherwise not.a >= 1 && a <= 10: available whenais at least 1 and at most 10, otherwise not.!a: the condition is "not a";acan be a boolean or a number (!0is true).