SwingIndex


Summary

Returns the Swing Index indicator instance.

Syntax

public SwingIndex SwingIndex(int limitMoveValue)
public SwingIndex SwingIndex(MarketSeries marketSeries, int limitMoveValue)

Parameters

NameDescription

Example 1

[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)
{
    //This stores current SwingIndex to Result Output
    Result[index] = si.Result[index];
    // This prints previous SwingIndex to log
    Print("Previous SwingIndex is: {0}", si.Result[index-1]);
}