How use using AccumSwingIndexReference in Cbot ?
How use using AccumSwingIndexReference in Cbot ?
26 Jun 2019, 15:39
How i can use this indicator ?
What is the limitmove ?
I just want sell or buy between some limits .
But i not understand the parameter mimitmove ?
what parameter i must use ?
Can i use ?
IndicatorSeries.High[last]
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]); }
using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo.Indicator
{
[Indicator]
public class AccumSwingIndexReferenceExample:Indicator
{
private AccumulativeSwingIndex _accumulativeSwingIndex;
[Parameter("Limit Move", DefaultValue = 12)]
public int LimitMove { get; set; }
[Output("Main")]
public IndicatorDataSeries Result { get; set; }
protected override void Initialize()
{
_accumulativeSwingIndex = Indicators.AccumulativeSwingIndex(LimitMove);
}
public override void Calculate(int index)
{
// Display Result of Indicator
Result[index] = _accumulativeSwingIndex.Result[index];
}
}
}