Merge branch 'develop' into pr/SmartManoj/6859

This commit is contained in:
Matthias
2022-06-23 20:43:35 +02:00
116 changed files with 11323 additions and 9511 deletions

View File

@@ -27,7 +27,7 @@ def check_exchange(config: Dict[str, Any], check_for_bad: bool = True) -> bool:
return True
logger.info("Checking exchange...")
exchange = config.get('exchange', {}).get('name').lower()
exchange = config.get('exchange', {}).get('name', '').lower()
if not exchange:
raise OperationalException(
f'This command requires a configured exchange. You should either use '

View File

@@ -95,6 +95,8 @@ class Configuration:
self._process_data_options(config)
self._process_analyze_options(config)
# Check if the exchange set by the user is supported
check_exchange(config, config.get('experimental', {}).get('block_bad_exchanges', True))
@@ -433,6 +435,19 @@ class Configuration:
self._args_to_config(config, argname='candle_types',
logstring='Detected --candle-types: {}')
def _process_analyze_options(self, config: Dict[str, Any]) -> None:
self._args_to_config(config, argname='analysis_groups',
logstring='Analysis reason groups: {}')
self._args_to_config(config, argname='enter_reason_list',
logstring='Analysis enter tag list: {}')
self._args_to_config(config, argname='exit_reason_list',
logstring='Analysis exit tag list: {}')
self._args_to_config(config, argname='indicator_list',
logstring='Analysis indicator list: {}')
def _process_runmode(self, config: Dict[str, Any]) -> None:
self._args_to_config(config, argname='dry_run',
@@ -490,7 +505,8 @@ class Configuration:
if not pairs_file.exists():
raise OperationalException(f'No pairs file found with path "{pairs_file}".')
config['pairs'] = load_file(pairs_file)
config['pairs'].sort()
if isinstance(config['pairs'], list):
config['pairs'].sort()
return
if 'config' in self.args and self.args['config']:
@@ -501,5 +517,5 @@ class Configuration:
pairs_file = config['datadir'] / 'pairs.json'
if pairs_file.exists():
config['pairs'] = load_file(pairs_file)
if 'pairs' in config:
if 'pairs' in config and isinstance(config['pairs'], list):
config['pairs'].sort()

View File

@@ -113,7 +113,7 @@ def process_temporary_deprecated_settings(config: Dict[str, Any]) -> None:
process_removed_setting(config, 'experimental', 'ignore_roi_if_buy_signal',
None, 'ignore_roi_if_entry_signal')
process_removed_setting(config, 'ask_strategy', 'use_sell_signal', None, 'exit_sell_signal')
process_removed_setting(config, 'ask_strategy', 'use_sell_signal', None, 'use_exit_signal')
process_removed_setting(config, 'ask_strategy', 'sell_profit_only', None, 'exit_profit_only')
process_removed_setting(config, 'ask_strategy', 'sell_profit_offset',
None, 'exit_profit_offset')

View File

@@ -15,7 +15,7 @@ def create_datadir(config: Dict[str, Any], datadir: Optional[str] = None) -> Pat
folder = Path(datadir) if datadir else Path(f"{config['user_data_dir']}/data")
if not datadir:
# set datadir
exchange_name = config.get('exchange', {}).get('name').lower()
exchange_name = config.get('exchange', {}).get('name', '').lower()
folder = folder.joinpath(exchange_name)
if not folder.is_dir():