Extract macd algo into its own file