Properly export non-optimized parameters

This commit is contained in:
Matthias 2021-06-15 20:14:31 +02:00
parent ef14359d31
commit aa5181ca81

View File

@ -208,9 +208,9 @@ class Hyperopt:
result: Dict[str, Any] = {} result: Dict[str, Any] = {}
strategy = self.backtesting.strategy strategy = self.backtesting.strategy
if not HyperoptTools.has_space(self.config, 'roi'): if not HyperoptTools.has_space(self.config, 'roi'):
result['roi'] = strategy.minimal_roi result['roi'] = {str(k): v for k, v in strategy.minimal_roi.items()}
if not HyperoptTools.has_space(self.config, 'stoploss'): if not HyperoptTools.has_space(self.config, 'stoploss'):
result['stoploss'] = strategy.stoploss result['stoploss'] = {'stoploss': strategy.stoploss}
if not HyperoptTools.has_space(self.config, 'trailing'): if not HyperoptTools.has_space(self.config, 'trailing'):
result['trailing'] = { result['trailing'] = {
'trailing_stop': strategy.trailing_stop, 'trailing_stop': strategy.trailing_stop,