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

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

            return(left.Times(constantIndicator));
        }