Enable plot_config to work in webserver mode

(requires strategy argument)
This commit is contained in:
Matthias
2023-01-18 18:15:07 +01:00
parent da0992f859
commit 3216a05a9e
2 changed files with 22 additions and 2 deletions

View File

@@ -1157,6 +1157,16 @@ class RPC:
self._freqtrade.strategy.plot_config['subplots'] = {}
return self._freqtrade.strategy.plot_config
@staticmethod
def _rpc_plot_config_with_strategy(config: Config) -> Dict[str, Any]:
from freqtrade.resolvers.strategy_resolver import StrategyResolver
strategy = StrategyResolver.load_strategy(config)
if (strategy.plot_config and 'subplots' not in strategy.plot_config):
strategy.plot_config['subplots'] = {}
return strategy.plot_config
@staticmethod
def _rpc_sysinfo() -> Dict[str, Any]:
return {