/// <summary>
        /// Creates a new CompositeIndicator such that the result will be the difference of the left and constant
        /// </summary>
        /// <remarks>
        /// value = left - constant
        /// </remarks>
        /// <param name="left">The left indicator</param>
        /// <param name="constant">The subtrahend</param>
        /// <returns>The difference of the left and right indicators</returns>
        public static CompositeIndicator <T> Minus <T>(this IndicatorBase <T> left, decimal constant)
            where T : IBaseData
        {
            var constantIndicator = new ConstantIndicator <T>(constant.ToString(CultureInfo.InvariantCulture), constant);

            return(left.Minus(constantIndicator));
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new CompositeIndicator such that the result will be the difference of the left and constant
        /// </summary>
        /// <remarks>
        /// value = left - constant
        /// </remarks>
        /// <param name="left">The left indicator</param>
        /// <param name="constant">The subtrahend</param>
        /// <returns>The difference of the left and right indicators</returns>
        public static CompositeIndicator <IndicatorDataPoint> Minus(this IndicatorBase <IndicatorDataPoint> left, decimal constant)
        {
            var constantIndicator = new ConstantIndicator <IndicatorDataPoint>(constant.ToString(CultureInfo.InvariantCulture), constant);

            return(left.Minus(constantIndicator));
        }