Default-stoploss-hyperopt should use decimal space, nto real

This commit is contained in:
Matthias
2021-04-14 20:32:34 +02:00
parent 862df2b431
commit e820814809
6 changed files with 10 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ from skopt.space import Categorical, Dimension, Integer, Real
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import timeframe_to_minutes
from freqtrade.misc import round_dict
from freqtrade.optimize.space import SKDecimal
from freqtrade.strategy import IStrategy
@@ -167,7 +168,7 @@ class IHyperOpt(ABC):
You may override it in your custom Hyperopt class.
"""
return [
Real(-0.35, -0.02, name='stoploss'),
SKDecimal(-0.35, -0.02, decimals=3, name='stoploss'),
]
def generate_trailing_params(self, params: Dict) -> Dict:

View File

@@ -0,0 +1,4 @@
# flake8: noqa: F401
from skopt.space import Categorical, Dimension, Integer, Real
from .decimalspace import SKDecimal