Summary

Returns the Swing Index indicator instance.

Syntax

SwingIndex(int limitMoveValue)

Parameters

Example

 
//...
[Parameter(DefaultValue = 20)]
public int limitMove { get; set; }

[Output("Main")]
public IndicatorDataSeries Result { get; set; }

private SwingIndex si;
protected override void Initialize()
{
   si = Indicators.SwingIndex(limitMove);
}

public override void Calculate(int index)
{
    Result[index] = si.Result[index];//This stores current SwingIndex to Result Output
    Print("Previous SwingIndex is: {0}", si.Result[index-1]);// This prints previous SwingIndex to log
}
//...