/// <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(T input) { Left.Update(input); Right.Update(input); return(_composer.Invoke(Left, Right)); }
/// <summary> /// Computes the next value of this indicator from the given state /// and returns an instance of the <see cref="IndicatorResult"/> class /// </summary> /// <param name="input">The input given to the indicator</param> /// <returns>An IndicatorResult object including the status of the indicator</returns> protected override IndicatorResult ValidateAndComputeNextValue(IndicatorDataPoint input) { return(_composer.Invoke(Left, Right)); }
/// <summary> /// Computes the next value of this indicator from the given state /// </summary> /// <remarks> /// Since this class overrides <see cref="ValidateAndComputeNextValue"/>, this method is a no-op /// </remarks> /// <param name="input">The input given to the indicator</param> /// <returns>A new value for this indicator</returns> protected override decimal ComputeNextValue(T input) { // this should never actually be invoked return(_composer.Invoke(Left, Right).Value); }