Esempio n. 1
0
        /// <summary>
        /// Creates a new CompositeIndicator such that the result will be the ratio of the left to the constant
        /// </summary>
        /// <remarks>
        /// value = left/constant
        /// </remarks>
        /// <param name="left">The left indicator</param>
        /// <param name="constant">The constant value denominator</param>
        /// <returns>The ratio of the left to the right indicator</returns>
        public static CompositeIndicator <T> Over <T>(this IndicatorBase <T> left, decimal constant)
            where T : IBaseData
        {
            var constantIndicator = new ConstantIndicator <T>(constant.ToString(CultureInfo.InvariantCulture), constant);

            return(left.Over(constantIndicator));
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new CompositeIndicator such that the result will be the ratio of the left to the constant
        /// </summary>
        /// <remarks>
        /// value = left/constant
        /// </remarks>
        /// <param name="left">The left indicator</param>
        /// <param name="constant">The constant value denominator</param>
        /// <returns>The ratio of the left to the right indicator</returns>
        public static CompositeIndicator <IndicatorDataPoint> Over(this IndicatorBase <IndicatorDataPoint> left, decimal constant)
        {
            var constantIndicator = new ConstantIndicator <IndicatorDataPoint>(constant.ToString(CultureInfo.InvariantCulture), constant);

            return(left.Over(constantIndicator));
        }