mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-28 18:00:23 +00:00
allow adjust trade position, even if there is an open order
This commit is contained in:
@@ -608,16 +608,13 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
"""
|
"""
|
||||||
# Walk through each pair and check if it needs changes
|
# Walk through each pair and check if it needs changes
|
||||||
for trade in Trade.get_open_trades():
|
for trade in Trade.get_open_trades():
|
||||||
# If there is any open orders, wait for them to finish.
|
# Do a wallets update (will be ratelimited to once per hour)
|
||||||
# TODO Remove to allow mul open orders
|
self.wallets.update(False)
|
||||||
if not trade.has_open_orders:
|
try:
|
||||||
# Do a wallets update (will be ratelimited to once per hour)
|
self.check_and_call_adjust_trade_position(trade)
|
||||||
self.wallets.update(False)
|
except DependencyException as exception:
|
||||||
try:
|
logger.warning(
|
||||||
self.check_and_call_adjust_trade_position(trade)
|
f"Unable to adjust position of trade for {trade.pair}: {exception}")
|
||||||
except DependencyException as exception:
|
|
||||||
logger.warning(
|
|
||||||
f"Unable to adjust position of trade for {trade.pair}: {exception}")
|
|
||||||
|
|
||||||
def check_and_call_adjust_trade_position(self, trade: Trade):
|
def check_and_call_adjust_trade_position(self, trade: Trade):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user