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 __onNewValue(self, dataSeries, dateTime, value):
      diff = None
      macdValue = None
      signalValue = None
      histogramValue = None
  
      # 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.__slowEMAWindow.onNewValue(dateTime, value)
      if self.__fastEMASkip > 0:
          self.__fastEMASkip -= 1
      else:
          self.__fastEMAWindow.onNewValue(dateTime, value)
          if self.__fastEMAWindow.windowFull():
              diff = (
                  self.__fastEMAWindow.getValue()
                  - self.__slowEMAWindow.getValue()
              )
  
      # Make the first MACD value available as soon as the first signal value is available.
      # I'M FORCING THIS BEHAVIOUR ONLY TO MAKE THIS FITLER MATCH TA-Lib MACD VALUES.
      self.__signalEMAWindow.onNewValue(dateTime, diff)
      if self.__signalEMAWindow.windowFull():
          macdValue = diff
          signalValue = self.__signalEMAWindow.getValue()
          histogramValue = macdValue - signalValue
  
      self.appendWithDateTime(dateTime, macdValue)
      self.__signal.appendWithDateTime(dateTime, signalValue)
      self.__histogram.appendWithDateTime(dateTime, histogramValue)
  
file_path: pyalgotrade/pyalgotrade/technical/macd.py
imports: from pyalgotrade.technical import ma
  from pyalgotrade import dataseries
label_desc: Use image node_id 4 for calling the MACD obj's underlying member method code with example usage: obj.__onNewValue(dataSeries, dateTime, value) without return types