From 40b61bbfe37582575c9c94944da23676a8b56e70 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 5 Oct 2020 07:44:12 +0200 Subject: [PATCH] Adjust trailing-stop to be python compliant --- freqtrade/optimize/hyperopt.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index edb51677e..5997e077b 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -262,6 +262,11 @@ class Hyperopt: ), default=str, indent=4, number_mode=rapidjson.NM_NATIVE) params_result += f"minimal_roi = {minimal_roi_result}" + elif space == 'trailing': + + for k, v in space_params.items(): + params_result += f'{k} = {v}\n' + else: params_result += f"{space}_params = {pformat(space_params, indent=4)}" params_result = params_result.replace("}", "\n}").replace("{", "{\n ")