Customisable parameters in plugins
Customisable parameters are user-editable fields whose values and settings are used in the operations of algorithms. These parameters allow users of a plugin to configure or control the behaviour of that plugin without needing to access or modify its source code.
Plugin customisable parameters in one minute
- Customisable parameters significantly extend what plugins can achieve, transforming static plugin code into dynamic and configurable logic.
- Plugin developers use customisable parameters in their code so that the end user can tailor the behaviour of the algo to their preferences.
- Customisable parameters in plugins improve accessibility and bring plugin operations in line with the established capabilities of cBots and indicators.
You can access and edit the customsiable parameters of a plugin, if available, in the plugins section in settings.

Parameter declaration
Parameters are declared using the [Parameter] attribute placed above a public C# property. The plugin engine reads these attributes at initialisation and creates the parameter panel accordingly.
Note
Python plugins use customisable parameters declared in their .cs files.
The code below tells cTrader to display an API Key text field under an API & SYSTEM SETTINGS group, and whatever a user enters will be assigned to the ApiKey property before the plugin starts.
1 2 | |

Here is a code example that declares several customisable parameters:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
Parameter usage
Once parameters are defined, they can be used inside any method in the plugin code. In most cases, these values will be read inside OnStart() or used during operations.
In this code example, several previously-declared customisable parameters are used in print statements, which are executed when the plugin starts:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
