switch ema5 trigger to ema3 cross trigger

This commit is contained in:
Janne Sinivirta 2018-01-16 11:16:08 +02:00
parent fadac5fe4a
commit dc01807b3c
2 changed files with 3 additions and 2 deletions

View File

@ -121,6 +121,7 @@ def populate_indicators(dataframe: DataFrame) -> DataFrame:
dataframe['bb_upperband'] = bollinger['upper'] dataframe['bb_upperband'] = bollinger['upper']
# EMA - Exponential Moving Average # EMA - Exponential Moving Average
dataframe['ema3'] = ta.EMA(dataframe, timeperiod=3)
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['ema50'] = ta.EMA(dataframe, timeperiod=50) dataframe['ema50'] = ta.EMA(dataframe, timeperiod=50)

View File

@ -99,7 +99,7 @@ SPACE = {
{'type': 'lower_bb_tema'}, {'type': 'lower_bb_tema'},
{'type': 'faststoch10'}, {'type': 'faststoch10'},
{'type': 'ao_cross_zero'}, {'type': 'ao_cross_zero'},
{'type': 'ema5_cross_ema10'}, {'type': 'ema3_cross_ema10'},
{'type': 'macd_cross_signal'}, {'type': 'macd_cross_signal'},
{'type': 'sar_reversal'}, {'type': 'sar_reversal'},
{'type': 'ht_sine'}, {'type': 'ht_sine'},
@ -231,7 +231,7 @@ def buy_strategy_generator(params):
'lower_bb_tema': (dataframe['tema'] < dataframe['bb_lowerband']), 'lower_bb_tema': (dataframe['tema'] < dataframe['bb_lowerband']),
'faststoch10': (crossed_above(dataframe['fastd'], 10.0)), 'faststoch10': (crossed_above(dataframe['fastd'], 10.0)),
'ao_cross_zero': (crossed_above(dataframe['ao'], 0.0)), 'ao_cross_zero': (crossed_above(dataframe['ao'], 0.0)),
'ema5_cross_ema10': (crossed_above(dataframe['ema5'], dataframe['ema10'])), 'ema3_cross_ema10': (crossed_above(dataframe['ema3'], dataframe['ema10'])),
'macd_cross_signal': (crossed_above(dataframe['macd'], dataframe['macdsignal'])), 'macd_cross_signal': (crossed_above(dataframe['macd'], dataframe['macdsignal'])),
'sar_reversal': (crossed_above(dataframe['close'], dataframe['sar'])), 'sar_reversal': (crossed_above(dataframe['close'], dataframe['sar'])),
'ht_sine': (crossed_above(dataframe['htleadsine'], dataframe['htsine'])), 'ht_sine': (crossed_above(dataframe['htleadsine'], dataframe['htsine'])),