add sar reversal as trigger

This commit is contained in:
Janne Sinivirta 2017-11-11 08:32:35 +02:00
parent 72aec6c320
commit 83fd27e031

View File

@ -50,6 +50,7 @@ def buy_strategy_generator(params):
'ao_cross_zero': (crossed_above(dataframe['ao'], 0.0)),
'ema5_cross_ema10': (crossed_above(dataframe['ema5'], dataframe['ema10'])),
'macd_cross_signal': (crossed_above(dataframe['macd'], dataframe['macdsignal'])),
'sar_reversal': (crossed_above(dataframe['close'], dataframe['sar'])),
}
conditions.append(triggers.get(params['trigger']['type']))
@ -125,6 +126,7 @@ def test_hyperopt(backtest_conf, backdata, mocker):
{'type': 'ao_cross_zero'},
{'type': 'ema5_cross_ema10'},
{'type': 'macd_cross_signal'},
{'type': 'sar_reversal'},
]),
}
trials = Trials()