Skip to main content
Every public property of the indicator with a getter and a setter is a parameter. Deepchart shows it in the settings window, saves it with the workspace and, for an indicator calculated on the server, sends its value with the request.
The initial value of the property is the default of the parameter.

Supported types

Layout

Three attributes control how a parameter appears:
  • [Category("General")] from System.ComponentModel puts it in a section.
  • [DisplayName("Price source")] gives it a label. Without it, the name of the property is used.
  • [VolCustom(...)] from VolumetricaControls sets the order and the limits.
The most used values of VolCustom:

Nested objects

A parameter can be a class with its own properties. The settings window shows it as a group:
Always give the property an instance as its initial value.

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 before OnSet. When the user changes one, the chart calls OnSet again and recalculates the indicator, so the calculation never has to watch for changes.