code: def QA_indicator_MACD(DataFrame, short=12, long=26, mid=9):
      
      CLOSE = DataFrame['close']
  
      DIF = EMA(CLOSE, short)-EMA(CLOSE, long)
      DEA = EMA(DIF, mid)
      MACD = (DIF-DEA)*2
  
      return pd.DataFrame({'DIF': DIF, 'DEA': DEA, 'MACD': MACD})
docs: MACD CALC