From 28184201e471385d29a48629ce6a6bac7bbb39ec Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Sat, 8 Feb 2020 02:47:50 +0300 Subject: [PATCH 1/2] Align sample_hyperopt_advanced.py to hyperopt_interface.py --- freqtrade/templates/sample_hyperopt_advanced.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/freqtrade/templates/sample_hyperopt_advanced.py b/freqtrade/templates/sample_hyperopt_advanced.py index b4bbee3fb..e66ef948b 100644 --- a/freqtrade/templates/sample_hyperopt_advanced.py +++ b/freqtrade/templates/sample_hyperopt_advanced.py @@ -230,7 +230,7 @@ class AdvancedSampleHyperOpt(IHyperOpt): 'stoploss' optimization hyperspace. """ return [ - Real(-0.5, -0.02, name='stoploss'), + Real(-0.35, -0.02, name='stoploss'), ] @staticmethod @@ -249,8 +249,15 @@ class AdvancedSampleHyperOpt(IHyperOpt): # other 'trailing' hyperspace parameters. Categorical([True], name='trailing_stop'), - Real(0.02, 0.35, name='trailing_stop_positive'), - Real(0.01, 0.1, name='trailing_stop_positive_offset'), + Real(0.01, 0.35, name='trailing_stop_positive'), + + # 'trailing_stop_positive_offset' should be greater than 'trailing_stop_positive', + # so this intermediate parameter is used as the value of the difference between + # them. The value of the 'trailing_stop_positive_offset' is constructed in the + # generate_trailing_params() method. + # This is similar to the hyperspace dimensions used for constructing the ROI tables. + Real(0.001, 0.1, name='trailing_stop_positive_offset_p1'), + Categorical([True, False], name='trailing_only_offset_is_reached'), ] From 61ced5e926db56740550192db1cba34883a81374 Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Sat, 8 Feb 2020 02:49:06 +0300 Subject: [PATCH 2/2] Fix typo --- freqtrade/optimize/hyperopt_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/optimize/hyperopt_interface.py b/freqtrade/optimize/hyperopt_interface.py index d7d917c19..b3cedef2c 100644 --- a/freqtrade/optimize/hyperopt_interface.py +++ b/freqtrade/optimize/hyperopt_interface.py @@ -207,7 +207,7 @@ class IHyperOpt(ABC): # so this intermediate parameter is used as the value of the difference between # them. The value of the 'trailing_stop_positive_offset' is constructed in the # generate_trailing_params() method. - # # This is similar to the hyperspace dimensions used for constructing the ROI tables. + # This is similar to the hyperspace dimensions used for constructing the ROI tables. Real(0.001, 0.1, name='trailing_stop_positive_offset_p1'), Categorical([True, False], name='trailing_only_offset_is_reached'),