feat: Update output for random space names

This commit is contained in:
Matthias
2025-11-02 10:42:23 +01:00
parent d1224367e5
commit 6dc2547177

View File

@@ -219,21 +219,13 @@ class HyperoptTools:
print(rapidjson.dumps(result_dict, default=str, number_mode=HYPER_PARAMS_FILE_FORMAT)) print(rapidjson.dumps(result_dict, default=str, number_mode=HYPER_PARAMS_FILE_FORMAT))
else: else:
HyperoptTools._params_pretty_print( all_spaces = list(params.keys() | non_optimized.keys())
params, "buy", "Buy hyperspace params:", non_optimized spaces = ["buy", "sell", "protection", "roi", "stoploss", "trailing", "max_open_trades"]
) spaces += [s for s in all_spaces if s not in spaces]
HyperoptTools._params_pretty_print( for space in spaces:
params, "sell", "Sell hyperspace params:", non_optimized HyperoptTools._params_pretty_print(
) params, space, f"{space.capitalize()} hyperspace params:", non_optimized
HyperoptTools._params_pretty_print( )
params, "protection", "Protection hyperspace params:", non_optimized
)
HyperoptTools._params_pretty_print(params, "roi", "ROI table:", non_optimized)
HyperoptTools._params_pretty_print(params, "stoploss", "Stoploss:", non_optimized)
HyperoptTools._params_pretty_print(params, "trailing", "Trailing stop:", non_optimized)
HyperoptTools._params_pretty_print(
params, "max_open_trades", "Max Open Trades:", non_optimized
)
@staticmethod @staticmethod
def _params_update_for_json(result_dict, params, non_optimized, space: str) -> None: def _params_update_for_json(result_dict, params, non_optimized, space: str) -> None: