Reinit orders list on "local" objects to instance variable

This commit is contained in:
Matthias 2023-10-29 09:18:00 +01:00
parent e97d9013d5
commit 2c20464983

View File

@ -536,6 +536,7 @@ class LocalTrade:
for key in kwargs:
setattr(self, key, kwargs[key])
self.recalc_open_trade_value()
self.orders = []
if self.trading_mode == TradingMode.MARGIN and self.interest_rate is None:
raise OperationalException(
f"{self.trading_mode.value} trading requires param interest_rate on trades")