AccumulativeSwingIndex


Summary

Initializes the Accumulative Swing Index indicator

Remarks

The Accumulative Swing Index indicator is used as a divergence and confirmation tool.

Syntax

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

Parameters

NameDescription

Example 1

[Parameter(DefaultValue = 20)]
public int limitMove { get; set; }
[Output("Main")]
public IndicatorDataSeries Result { get; set; }
private AccumulativeSwingIndex asi;
protected override void Initialize()
{
   asi = Indicators.AccumulativeSwingIndex(limitMove);
}
public override void Calculate(int index)
{
    //This stores current AccumulativeSwingIndex to Result Output
    Result[index] = asi.Result[index];
    // This prints previous AccumulativeSwingIndex to log
    Print("Previous AccumulativeSwingIndex is: {0}", asi.Result[index-1]);
}