add heikenashi reversal bullish trigger to hyperopt
This commit is contained in:
parent
ce963aae58
commit
8896b39231
@ -211,14 +211,12 @@ def populate_indicators(dataframe: DataFrame) -> DataFrame:
|
|||||||
|
|
||||||
# Chart type
|
# Chart type
|
||||||
# ------------------------------------
|
# ------------------------------------
|
||||||
"""
|
|
||||||
# Heikinashi stategy
|
# Heikinashi stategy
|
||||||
heikinashi = qtpylib.heikinashi(dataframe)
|
heikinashi = qtpylib.heikinashi(dataframe)
|
||||||
dataframe['ha_open'] = heikinashi['open']
|
dataframe['ha_open'] = heikinashi['open']
|
||||||
dataframe['ha_close'] = heikinashi['close']
|
dataframe['ha_close'] = heikinashi['close']
|
||||||
dataframe['ha_high'] = heikinashi['high']
|
dataframe['ha_high'] = heikinashi['high']
|
||||||
dataframe['ha_low'] = heikinashi['low']
|
dataframe['ha_low'] = heikinashi['low']
|
||||||
"""
|
|
||||||
|
|
||||||
return dataframe
|
return dataframe
|
||||||
|
|
||||||
|
@ -107,6 +107,7 @@ SPACE = {
|
|||||||
{'type': 'macd_cross_signal'},
|
{'type': 'macd_cross_signal'},
|
||||||
{'type': 'sar_reversal'},
|
{'type': 'sar_reversal'},
|
||||||
{'type': 'ht_sine'},
|
{'type': 'ht_sine'},
|
||||||
|
{'type': 'heiken_reversal_bull'},
|
||||||
]),
|
]),
|
||||||
'stoploss': hp.uniform('stoploss', -0.5, -0.02),
|
'stoploss': hp.uniform('stoploss', -0.5, -0.02),
|
||||||
}
|
}
|
||||||
@ -241,6 +242,8 @@ def buy_strategy_generator(params):
|
|||||||
'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'])),
|
||||||
|
'heiken_reversal_bull': (crossed_above(dataframe['ha_close'], dataframe['ha_open'])) &
|
||||||
|
(dataframe['ha_low'] == dataframe['ha_open']),
|
||||||
}
|
}
|
||||||
conditions.append(triggers.get(params['trigger']['type']))
|
conditions.append(triggers.get(params['trigger']['type']))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user