add MACD to analyze

This commit is contained in:
Janne Sinivirta 2017-10-28 16:43:34 +03:00
parent 22cfef7d36
commit 893738d6f0

View File

@ -48,7 +48,10 @@ def populate_indicators(dataframe: DataFrame) -> DataFrame:
dataframe['ema5'] = ta.EMA(dataframe, timeperiod=5) dataframe['ema5'] = ta.EMA(dataframe, timeperiod=5)
dataframe['ema10'] = ta.EMA(dataframe, timeperiod=10) dataframe['ema10'] = ta.EMA(dataframe, timeperiod=10)
dataframe['ao'] = awesome_oscillator(dataframe) dataframe['ao'] = awesome_oscillator(dataframe)
macd = ta.MACD(dataframe)
dataframe['macd'] = macd['macd']
dataframe['macdsignal'] = macd['macdsignal']
dataframe['macdhist'] = macd['macdhist']
return dataframe return dataframe