/// <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) { var presentValue = (input.High + input.Low) / 2; SlowAo.Update(input.Time, presentValue); FastAo.Update(input.Time, presentValue); return(IsReady ? FastAo - SlowAo : 0m); }
/// <summary> /// Resets this indicator /// </summary> public override void Reset() { FastAo.Reset(); SlowAo.Reset(); base.Reset(); }