build macd