Removed changes from tests/strategy/strats that hyperopted short parameters, because these are supposed to be legacy tests

This commit is contained in:
Sam Germain
2021-08-22 21:38:15 -06:00
parent 5ca3f49cb5
commit 8644449c33
5 changed files with 3 additions and 82 deletions

View File

@@ -130,19 +130,6 @@ class DefaultStrategy(IStrategy):
),
'buy'] = 1
dataframe.loc[
(
(dataframe['rsi'] > 65) &
(dataframe['fastd'] > 65) &
(dataframe['adx'] < 70) &
(dataframe['plus_di'] < 0.5) # TODO-lev: What to do here
) |
(
(dataframe['adx'] < 35) &
(dataframe['plus_di'] < 0.5) # TODO-lev: What to do here
),
'enter_short'] = 1
return dataframe
def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
@@ -166,20 +153,4 @@ class DefaultStrategy(IStrategy):
(dataframe['minus_di'] > 0.5)
),
'sell'] = 1
dataframe.loc[
(
(
(qtpylib.crossed_below(dataframe['rsi'], 30)) |
(qtpylib.crossed_below(dataframe['fastd'], 30))
) &
(dataframe['adx'] < 90) &
(dataframe['minus_di'] < 0) # TODO-lev: what to do here
) |
(
(dataframe['adx'] > 30) &
(dataframe['minus_di'] < 0.5) # TODO-lev: what to do here
),
'exit_short'] = 1
return dataframe

View File

@@ -60,15 +60,6 @@ class HyperoptableStrategy(IStrategy):
'sell_minusdi': 0.4
}
enter_short_params = {
'short_rsi': 65,
}
exit_short_params = {
'exit_short_rsi': 26,
'exit_short_minusdi': 0.6
}
buy_rsi = IntParameter([0, 50], default=30, space='buy')
buy_plusdi = RealParameter(low=0, high=1, default=0.5, space='buy')
sell_rsi = IntParameter(low=50, high=100, default=70, space='sell')
@@ -87,12 +78,6 @@ class HyperoptableStrategy(IStrategy):
})
return prot
enter_short_rsi = IntParameter([50, 100], default=70, space='sell')
enter_short_plusdi = RealParameter(low=0, high=1, default=0.5, space='sell')
exit_short_rsi = IntParameter(low=0, high=50, default=30, space='buy')
exit_short_minusdi = DecimalParameter(low=0, high=1, default=0.4999, decimals=3, space='buy',
load=False)
def informative_pairs(self):
"""
Define additional, informative pair/interval combinations to be cached from the exchange.
@@ -175,19 +160,6 @@ class HyperoptableStrategy(IStrategy):
),
'buy'] = 1
dataframe.loc[
(
(dataframe['rsi'] > self.enter_short_rsi.value) &
(dataframe['fastd'] > 65) &
(dataframe['adx'] < 70) &
(dataframe['plus_di'] < self.enter_short_plusdi.value)
) |
(
(dataframe['adx'] < 35) &
(dataframe['plus_di'] < self.enter_short_plusdi.value)
),
'enter_short'] = 1
return dataframe
def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
@@ -211,20 +183,4 @@ class HyperoptableStrategy(IStrategy):
(dataframe['minus_di'] > self.sell_minusdi.value)
),
'sell'] = 1
dataframe.loc[
(
(
(qtpylib.crossed_below(dataframe['rsi'], self.exit_short_rsi.value)) |
(qtpylib.crossed_below(dataframe['fastd'], 30))
) &
(dataframe['adx'] < 90) &
(dataframe['minus_di'] < 0) # TODO-lev: What should this be
) |
(
(dataframe['adx'] < 30) &
(dataframe['minus_di'] < self.exit_short_minusdi.value)
),
'exit_short'] = 1
return dataframe

View File

@@ -84,5 +84,4 @@ class TestStrategyLegacy(IStrategy):
(dataframe['volume'] > 0)
),
'sell'] = 1
return dataframe