Remove missleading fallback hyperopt methods
This commit is contained in:
@@ -132,35 +132,3 @@ class AverageHyperopt(IHyperOpt):
|
||||
return [
|
||||
Categorical(sellTriggerList, name='sell-trigger')
|
||||
]
|
||||
|
||||
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Based on TA indicators. Should be a copy of from strategy
|
||||
must align to populate_indicators in this file
|
||||
Only used when --spaces does not include buy
|
||||
"""
|
||||
dataframe.loc[
|
||||
(
|
||||
qtpylib.crossed_above(
|
||||
dataframe[f'maShort({shortRangeBegin})'],
|
||||
dataframe[f'maMedium({mediumRangeBegin})'])
|
||||
),
|
||||
'buy'] = 1
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Based on TA indicators. Should be a copy of from strategy
|
||||
must align to populate_indicators in this file
|
||||
Only used when --spaces does not include sell
|
||||
"""
|
||||
dataframe.loc[
|
||||
(
|
||||
qtpylib.crossed_above(
|
||||
dataframe[f'maMedium({mediumRangeBegin})'],
|
||||
dataframe[f'maShort({shortRangeBegin})'])
|
||||
),
|
||||
'sell'] = 1
|
||||
|
||||
return dataframe
|
||||
|
||||
@@ -98,33 +98,3 @@ class MACDStrategy_hyperopt(IHyperOpt):
|
||||
return [
|
||||
Integer(0, 700, name='sell-cci-value'),
|
||||
]
|
||||
|
||||
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Based on TA indicators. Should be a copy of from strategy
|
||||
must align to populate_indicators in this file
|
||||
Only used when --spaces does not include buy
|
||||
"""
|
||||
dataframe.loc[
|
||||
(
|
||||
(dataframe['macd'] > dataframe['macdsignal']) &
|
||||
(dataframe['cci'] <= -50.0)
|
||||
),
|
||||
'buy'] = 1
|
||||
|
||||
return dataframe
|
||||
|
||||
def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
"""
|
||||
Based on TA indicators. Should be a copy of from strategy
|
||||
must align to populate_indicators in this file
|
||||
Only used when --spaces does not include sell
|
||||
"""
|
||||
dataframe.loc[
|
||||
(
|
||||
(dataframe['macd'] < dataframe['macdsignal']) &
|
||||
(dataframe['cci'] >= 100.0)
|
||||
),
|
||||
'sell'] = 1
|
||||
|
||||
return dataframe
|
||||
|
||||
@@ -151,45 +151,3 @@ class ReinforcedSmoothScalp(IHyperOpt):
|
||||
# 'sell-macd_cross_signal',
|
||||
# 'sell-sar_reversal'], name='sell-trigger')
|
||||
]
|
||||
|
||||
def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
dataframe.loc[
|
||||
(
|
||||
(
|
||||
(dataframe['open'] < dataframe['ema_low']) &
|
||||
(dataframe['adx'] > 30) &
|
||||
(dataframe['mfi'] < 30) &
|
||||
(
|
||||
(dataframe['fastk'] < 30) &
|
||||
(dataframe['fastd'] < 30) &
|
||||
(qtpylib.crossed_above(dataframe['fastk'], dataframe['fastd']))
|
||||
) &
|
||||
(dataframe['resample_sma'] < dataframe['close'])
|
||||
)
|
||||
# |
|
||||
# # try to get some sure things independent of resample
|
||||
# ((dataframe['rsi'] - dataframe['mfi']) < 10) &
|
||||
# (dataframe['mfi'] < 30) &
|
||||
# (dataframe['cci'] < -200)
|
||||
),
|
||||
'buy'] = 1
|
||||
return dataframe
|
||||
|
||||
def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
dataframe.loc[
|
||||
(
|
||||
(
|
||||
(
|
||||
(dataframe['open'] >= dataframe['ema_high'])
|
||||
|
||||
) |
|
||||
(
|
||||
(qtpylib.crossed_above(dataframe['fastk'], 70)) |
|
||||
(qtpylib.crossed_above(dataframe['fastd'], 70))
|
||||
|
||||
)
|
||||
) & (dataframe['cci'] > 100)
|
||||
)
|
||||
,
|
||||
'sell'] = 1
|
||||
return dataframe
|
||||
|
||||
Reference in New Issue
Block a user