Trader.NET APIs
|
To write a custom indicator, you must derive from the base class Indicator. The calculation must be provided in the Calculate method. There are two custom attributes designed to denote a property. They are IndicatorParameterAttribute and IndicatorValueAttribute. To provide customizable color for each indicator series, additional properties (type of SerializableColor) must be provided. The property name must follow the naming convention "PropertyNameColor". For implementation details, please refer to the sample script Stochastic. All scripts must be placed in the Scripts folder and they can be compiled successfully either using .NET compiler or the built-in Script Manager. The built-in Script Manager does not use any external library you may use. If you use any third party library in your script, you have to compile it externally. Please refer to your compiler command manual for more details. You will have to reference TraderCharting.exe at least plus any other references you need to use. Once compiled externally, you can copy the DLL to the Plugins folder. All indicators work with three kinds of data: Series, TimeSeries and Quotes based on the Visitor design pattern.
Supported data types: Base classes: Built-in Indicators: |