Aroon


Summary

An indicator for identifying trends in a currency pair, as well as for gauging the probability of a trend reversal.

Remarks

The indicator fluctuates between 0 and 100, with values above 80 signalling an upward trend, and values below 20 signalling a downward trend.

Syntax

public interface Aroon

Members

NameTypeSummary
Down PropertyAroon Down
Up PropertyAroon Up

Example 1

using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo.Indicators
{
    [Indicator]
    public class AroonReferenceExample:Indicator
    {
        private Aroon _aroon;
        [Parameter("Periods", DefaultValue = 25)]
        public int Periods { get; set; }
        [Output("Up")]
        public IndicatorDataSeries ResultAroonUp { get; set; }
        [Output("Down")]
        public IndicatorDataSeries ResultAroonDown { get; set; }
        protected override void Initialize()
        {
            _aroon = Indicators.Aroon(Periods);
        }
        public override void Calculate(int index)
        {
            ResultAroonUp[index] = _aroon.Up[index];
            ResultAroonDown[index] = _aroon.Down[index];
        }
    }
}