/// <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); }
/// <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); }