|
|
|
|
@ -137,11 +137,8 @@ class IHyperOpt(ABC):
|
|
|
|
|
logger.info(f"Max roi table: {round_dict(self.generate_roi_table(p), 3)}")
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
# Integer(roi_limits["roi_t1_min"], roi_limits["roi_t1_max"], name="roi_t1"),
|
|
|
|
|
ft_IntDistribution("roi_t1", roi_limits["roi_t1_min"], roi_limits["roi_t1_max"]),
|
|
|
|
|
# Integer(roi_limits["roi_t2_min"], roi_limits["roi_t2_max"], name="roi_t2"),
|
|
|
|
|
ft_IntDistribution("roi_t2", roi_limits["roi_t2_min"], roi_limits["roi_t2_max"]),
|
|
|
|
|
# Integer(roi_limits["roi_t3_min"], roi_limits["roi_t3_max"], name="roi_t3"),
|
|
|
|
|
ft_IntDistribution("roi_t3", roi_limits["roi_t3_min"], roi_limits["roi_t3_max"]),
|
|
|
|
|
SKDecimal(
|
|
|
|
|
roi_limits["roi_p1_min"], roi_limits["roi_p1_max"], decimals=3, name="roi_p1"
|
|
|
|
|
@ -191,7 +188,6 @@ class IHyperOpt(ABC):
|
|
|
|
|
# This parameter is included into the hyperspace dimensions rather than assigning
|
|
|
|
|
# it explicitly in the code in order to have it printed in the results along with
|
|
|
|
|
# other 'trailing' hyperspace parameters.
|
|
|
|
|
# Categorical([True], name="trailing_stop"),
|
|
|
|
|
ft_CategoricalDistribution("trailing_stop", [True]),
|
|
|
|
|
SKDecimal(0.01, 0.35, decimals=3, name="trailing_stop_positive"),
|
|
|
|
|
# 'trailing_stop_positive_offset' should be greater than 'trailing_stop_positive',
|
|
|
|
|
@ -200,7 +196,6 @@ class IHyperOpt(ABC):
|
|
|
|
|
# generate_trailing_params() method.
|
|
|
|
|
# This is similar to the hyperspace dimensions used for constructing the ROI tables.
|
|
|
|
|
SKDecimal(0.001, 0.1, decimals=3, name="trailing_stop_positive_offset_p1"),
|
|
|
|
|
# Categorical([True, False], name="trailing_only_offset_is_reached"),
|
|
|
|
|
ft_CategoricalDistribution("trailing_only_offset_is_reached", [True, False]),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
@ -210,9 +205,6 @@ class IHyperOpt(ABC):
|
|
|
|
|
|
|
|
|
|
You may override it in your custom Hyperopt class.
|
|
|
|
|
"""
|
|
|
|
|
# return [
|
|
|
|
|
# Integer(-1, 10, name="max_open_trades"),
|
|
|
|
|
# ]
|
|
|
|
|
return [ft_IntDistribution("max_open_trades", -1, 10)]
|
|
|
|
|
|
|
|
|
|
# This is needed for proper unpickling the class attribute timeframe
|
|
|
|
|
|