MACD as functions