Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Correlation"/>.
        /// </summary>
        public Correlation()
        {
            _source = new StandardDeviation();
            _other  = new StandardDeviation();

            Length = 20;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BollingerBand"/>.
        /// </summary>
        /// <param name="ma">Moving Average.</param>
        /// <param name="dev">Standard deviation.</param>
        public BollingerBand(LengthIndicator <decimal> ma, StandardDeviation dev)
        {
            if (ma == null)
            {
                throw new ArgumentNullException(nameof(ma));
            }

            if (dev == null)
            {
                throw new ArgumentNullException(nameof(dev));
            }

            _ma  = ma;
            _dev = dev;
        }