/// <summary>
        /// Initializes a new instance of the <see cref="MovingAverageConvergenceDivergence"/>.
        /// </summary>
        /// <param name="longMa">Long moving average.</param>
        /// <param name="shortMa">Short moving average.</param>
        public MovingAverageConvergenceDivergence(string name, ExponentialMovingAverage longMa, ExponentialMovingAverage shortMa)
        {
            if (longMa == null)
            {
                throw new ArgumentNullException(nameof(longMa));
            }

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

            Name    = name;
            ShortMa = shortMa;
            LongMa  = longMa;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="MovingAverageConvergenceDivergenceSignal"/>.
 /// </summary>
 public MovingAverageConvergenceDivergenceSignal(string name = "MACD Signal")
 {
     Name     = name;
     Macd     = new MovingAverageConvergenceDivergence();
     SignalMa = new ExponentialMovingAverage(9);
 }