Topic: How to make a Custom Indicator from an original one
The custom indicators are fully identical to the original (hard-coded) indicators. The only difference is that a custom indicator has to be properly marked as custom by setting the property CustomIndicator to true.
CustomIndicator = true;
You can use the code of original indicators. It is published here: Forex indicators source code.
Example of making a custom RSI
This is part of the original RSI:
...
...
public class RSI : Indicator
{
/// <summary>
/// Sets the default indicator parameters for the designated slot type
/// </summary>
public RSI(SlotTypes slotType)
{
// General properties
IndicatorName = "RSI";
PossibleSlots = SlotTypes.OpenFilter | SlotTypes.CloseFilter;
SeparatedChart = true;
SeparatedChartMinValue = 0;
SeparatedChartMaxValue = 100;
// Setting up the indicator parameters
IndParam = new IndicatorParam();
IndParam.IndicatorName = IndicatorName;
IndParam.SlotType = slotType;
...
...
To make a custom RSI you have to change:
1. the class name,
2. the constructor name,
3. the indicator name,
4. to mark it as custom.
That is all