diff --git a/octobot_backtesting/api/importer.py b/octobot_backtesting/api/importer.py index 2df98a4..adaca99 100644 --- a/octobot_backtesting/api/importer.py +++ b/octobot_backtesting/api/importer.py @@ -34,10 +34,12 @@ def get_data_file(importer) -> str: return importer.file_path -def get_data_file_from_importers(available_importers, symbol, time_frame) -> str: +def get_data_file_from_importers( + available_importers, symbol, time_frame, exchange_name=None) -> str: for importer in available_importers: if symbol in get_available_symbols(importer) and \ - time_frame in get_available_time_frames(importer): + time_frame in get_available_time_frames(importer) and \ + (not exchange_name or exchange_name == importer.exchange_name): return get_data_file_path(importer) return None diff --git a/octobot_backtesting/constants.py b/octobot_backtesting/constants.py index 3ecfc29..10c689e 100644 --- a/octobot_backtesting/constants.py +++ b/octobot_backtesting/constants.py @@ -19,6 +19,7 @@ CONFIG_BACKTESTING = "backtesting" CONFIG_BACKTESTING_DATA_FILES = "files" +CONFIG_CURRENT_BOT_DATA = "current_bot_data" CONFIG_ANALYSIS_ENABLED_OPTION = "post_analysis_enabled" CONFIG_BACKTESTING_OTHER_MARKETS_STARTING_PORTFOLIO = 10000 BACKTESTING_DATA_OHLCV = "ohlcv"