/// <summary>
        /// Computes the next value of this indicator from the given state
        /// </summary>
        /// <param name="input">The input given to the indicator</param>
        /// <returns>A new value for this indicator</returns>
        protected override decimal ComputeNextValue(IBaseDataBar input)
        {
            AroonUp.Update(input.Time, input.High);
            AroonDown.Update(input.Time, input.Low);

            return(AroonUp - AroonDown);
        }
Example #2
0
        /// <summary>
        /// Computes the next value of this indicator from the given state
        /// </summary>
        /// <param name="input">The input given to the indicator</param>
        /// <returns>A new value for this indicator</returns>
        protected override decimal ComputeNextValue(DataPointBar input)
        {
            AroonUp.Update(input.Occured, input.TimeZone, input.High);
            AroonDown.Update(input.Occured, input.TimeZone, input.Low);

            return(AroonUp - AroonDown);
        }
Example #3
0
        /// <summary>
        ///      Computes the next value of this indicator from the given state
        /// </summary>
        /// <param name="time"></param>
        /// <param name="input">The input given to the indicator</param>
        /// <returns>A new value for this indicator</returns>
        protected override DoubleArray Forward(long time, DoubleArray input)
        {
            AroonUp.Update(time, input[HighIdx]);
            AroonDown.Update(time, input[LowIdx]);

            return(AroonUp.Current.Value - AroonDown.Current.Value);
        }
 /// <summary>
 /// Resets this indicator and both sub-indicators (AroonUp and AroonDown)
 /// </summary>
 public override void Reset()
 {
     AroonUp.Reset();
     AroonDown.Reset();
     base.Reset();
 }