Refactoring to use strategy based configuration

This commit is contained in:
Reigo Reinmets
2021-12-24 12:38:43 +02:00
parent ac690e9215
commit de79d25caf
13 changed files with 117 additions and 200 deletions

View File

@@ -721,7 +721,7 @@ class RPC:
# check if pair already has an open pair
trade = Trade.get_trades([Trade.is_open.is_(True), Trade.pair == pair]).first()
if trade:
if not self._config.get('position_adjustment_enable', False):
if not self._freqtrade.strategy.position_adjustment_enable:
raise RPCException(f'position for {pair} already open - id: {trade.id}')
# gen stake amount