optimize macd log