예제 #1
0
        /// <summary>
        /// Creates a new CompositeIndicator such that the result will be the sum of the left and the constant
        /// </summary>
        /// <remarks>
        /// value = left + constant
        /// </remarks>
        /// <param name="left">The left indicator</param>
        /// <param name="constant">The addend</param>
        /// <returns>The sum of the left and right indicators</returns>
        public static CompositeIndicator <T> Plus <T>(this IndicatorBase <T> left, decimal constant)
            where T : IBaseData
        {
            var constantIndicator = new ConstantIndicator <T>(constant.ToString(CultureInfo.InvariantCulture), constant);

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

            return(left.Plus(constantIndicator));
        }