Supported types
Layout
Three attributes control how a parameter appears:[Category("General")]fromSystem.ComponentModelputs it in a section.[DisplayName("Price source")]gives it a label. Without it, the name of the property is used.[VolCustom(...)]fromVolumetricaControlssets the order and the limits.
VolCustom:
Nested objects
A parameter can be a class with its own properties. The settings window shows it as a group:Properties that are not parameters
- A property without a public setter is not a parameter. The series definitions use this:
public ChartSeriesDefinition Average { get; private set; }. - Fields are never parameters: keep the state of the calculation in fields.
The names of the properties are what the workspace saves. Renaming a property loses the value the user saved for it.
Reading the parameters
Read them wherever you need: they are set beforeOnSet. When the user changes one, the chart calls OnSet again and recalculates the indicator, so the calculation never has to watch for changes.