class_docstr: Moving Average Convergence-Divergence indicator as described in http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:moving_average_convergence_divergence_macd.
  
  :param dataSeries: The DataSeries instance being filtered.
  :type dataSeries: :class:`pyalgotrade.dataseries.DataSeries`.
  :param fastEMA: The number of values to use to calculate the fast EMA.
  :type fastEMA: int.
  :param slowEMA: The number of values to use to calculate the slow EMA.
  :type slowEMA: int.
  :param signalEMA: The number of values to use to calculate the signal EMA.
  :type signalEMA: int.
  :param maxLen: The maximum number of values to hold.
      Once a bounded length is full, when new items are added, a corresponding number of items are discarded from the
      opposite end. If None then dataseries.DEFAULT_MAX_LEN is used.
  :type maxLen: int.
code: def __init__(
      self, dataSeries, fastEMA, slowEMA, signalEMA, maxLen=None
  ):
      assert fastEMA > 0
      assert slowEMA > 0
      assert fastEMA < slowEMA
      assert signalEMA > 0
  
      super(MACD, self).__init__(maxLen)
  
      # We need to skip some values when calculating the fast EMA in order for both EMA
      # to calculate their first values at the same time.
      # I'M FORCING THIS BEHAVIOUR ONLY TO MAKE THIS FITLER MATCH TA-Lib MACD VALUES.
      self.__fastEMASkip = slowEMA - fastEMA
  
      self.__fastEMAWindow = ma.EMAEventWindow(fastEMA)
      self.__slowEMAWindow = ma.EMAEventWindow(slowEMA)
      self.__signalEMAWindow = ma.EMAEventWindow(signalEMA)
      self.__signal = dataseries.SequenceDataSeries(maxLen)
      self.__histogram = dataseries.SequenceDataSeries(maxLen)
      dataSeries.getNewValueEvent().subscribe(self.__onNewValue)
  
file_path: pyalgotrade/pyalgotrade/technical/macd.py
imports: from pyalgotrade.technical import ma
  from pyalgotrade import dataseries
label_desc: Use image node_id 1 to create a new MACD object from inherited base classes: dataseries with example: obj = MACD(dataSeries, fastEMA, slowEMA, signalEMA, maxLen)