From e2ad5ba4f0afc6aebcd58f4078d66639cae0d43f Mon Sep 17 00:00:00 2001 From: Tai NA Date: Sun, 17 Oct 2021 11:22:48 +0700 Subject: [PATCH] Fix bug download candle data and export csv not using new timeframes config --- user_data/mgm_tools/ExportCsvResults.py | 4 ++-- user_data/mgm_tools/mgm_hurry/MoniGoManiCli.py | 2 +- user_data/strategies/MasterMoniGoManiHyperStrategy.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/user_data/mgm_tools/ExportCsvResults.py b/user_data/mgm_tools/ExportCsvResults.py index 503e26b1e..71e3e095a 100644 --- a/user_data/mgm_tools/ExportCsvResults.py +++ b/user_data/mgm_tools/ExportCsvResults.py @@ -81,8 +81,8 @@ def ExportCsvResults(config_file, input_file, output_file): # results_df['balance_max'] = epochs['results_metrics.csum_max'].apply(lambda x: round(x,2)) results_df['pairlist'] = epochs['results_metrics.pairlist'] results_df['max_open_trades_setting'] = epochs['results_metrics.max_open_trades_setting'] - results_df['timeframe'] = mgm_config['timeframe'] - results_df['backtest_timeframe'] = mgm_config['backtest_timeframe'] + results_df['timeframe'] = mgm_config['timeframes']['timeframe'] + results_df['backtest_timeframe'] = mgm_config['timeframes']['backtest_timeframe'] results_df['timerange'] = epochs['results_metrics.timerange'] results_df['backtest_start'] = epochs['results_metrics.backtest_start'] results_df['backtest_end'] = epochs['results_metrics.backtest_end'] diff --git a/user_data/mgm_tools/mgm_hurry/MoniGoManiCli.py b/user_data/mgm_tools/mgm_hurry/MoniGoManiCli.py index 7fb4b8aad..72cad89d0 100644 --- a/user_data/mgm_tools/mgm_hurry/MoniGoManiCli.py +++ b/user_data/mgm_tools/mgm_hurry/MoniGoManiCli.py @@ -354,7 +354,7 @@ def calculate_timerange_start_minus_startup_candle_count(self, timerange: int = # Calculate the amount of days to add to the timerange based on the startup candle count & candle size mgm_config_files = self.monigomani_config.load_config_files() timeframe_minutes = self.timeframe_to_minutes( - mgm_config_files['mgm-config']['monigomani_settings']['timeframe']) + mgm_config_files['mgm-config']['monigomani_settings']['timeframes']['timeframe']) startup_candle_count = mgm_config_files['mgm-config']['monigomani_settings']['startup_candle_count'] extra_days = ceil((timeframe_minutes * startup_candle_count) / (60 * 24)) diff --git a/user_data/strategies/MasterMoniGoManiHyperStrategy.py b/user_data/strategies/MasterMoniGoManiHyperStrategy.py index c7607b8b3..b70c5f9d7 100644 --- a/user_data/strategies/MasterMoniGoManiHyperStrategy.py +++ b/user_data/strategies/MasterMoniGoManiHyperStrategy.py @@ -97,9 +97,9 @@ class MasterMoniGoManiHyperStrategy(IStrategy, ABC): # Apply the loaded MoniGoMani Settings try: - backtest_timeframe = mgm_config["timeframes"]['backtest_timeframe'] - core_trend_timeframe_multiplier = mgm_config["timeframes"]['core_trend_timeframe_multiplier'] - timeframe = mgm_config["timeframes"]['timeframe'] + backtest_timeframe = mgm_config['timeframes']['backtest_timeframe'] + core_trend_timeframe_multiplier = mgm_config['timeframes']['core_trend_timeframe_multiplier'] + timeframe = mgm_config['timeframes']['timeframe'] startup_candle_count = mgm_config['startup_candle_count'] precision = mgm_config['precision'] min_weighted_signal_value = mgm_config['weighted_signal_spaces']['min_weighted_signal_value']