/// <summary> /// Обработать входное значение. /// </summary> /// <param name="input">Входное значение.</param> /// <returns>Результирующее значение.</returns> protected override IIndicatorValue OnProcess(IIndicatorValue input) { var shortValue = ShortMa.Process(input); var longValue = LongMa.Process(input); return(new DecimalIndicatorValue(this, shortValue.GetValue <decimal>() - longValue.GetValue <decimal>())); }
/// <summary> /// To handle the input value. /// </summary> /// <param name="input">The input value.</param> /// <returns>The resulting value.</returns> protected override IIndicatorValue OnProcess(IIndicatorValue input) { var mpValue = MedianPrice.Process(input); var sValue = ShortMa.Process(mpValue).GetValue <decimal>(); var lValue = LongMa.Process(mpValue).GetValue <decimal>(); return(new DecimalIndicatorValue(this, sValue - lValue)); }