/// <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 shortValue = ShortMa.Process(input); var longValue = LongMa.Process(input); return(new DecimalIndicatorValue(this, shortValue.GetValue <decimal>() - longValue.GetValue <decimal>())); }
public SignalAndValue Process(Candle candle) { var shortValue = ShortMa.Process(candle); var longValue = LongMa.Process(candle); return(new SignalAndValue(shortValue.Value - longValue.Value, IsFormed)); }
/// <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)); }