Add MACD calcutation and Fix many bugs