Beginning of MACD, still have some errors