Use helper-method to modify trades_open
This commit is contained in:
parent
2b70106019
commit
e82baf5f60
@ -1125,7 +1125,7 @@ class Backtesting:
|
|||||||
open_trade_count -= 1
|
open_trade_count -= 1
|
||||||
open_trade_count_start -= 1
|
open_trade_count_start -= 1
|
||||||
open_trades[pair].remove(t)
|
open_trades[pair].remove(t)
|
||||||
LocalTrade.trades_open.remove(t)
|
LocalTrade.remove_bt_trade(t)
|
||||||
self.wallets.update()
|
self.wallets.update()
|
||||||
|
|
||||||
# 2. Process entries.
|
# 2. Process entries.
|
||||||
|
@ -1077,6 +1077,10 @@ class LocalTrade():
|
|||||||
else:
|
else:
|
||||||
LocalTrade.trades.append(trade)
|
LocalTrade.trades.append(trade)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def remove_bt_trade(trade):
|
||||||
|
LocalTrade.trades_open.remove(trade)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_open_trades() -> List[Any]:
|
def get_open_trades() -> List[Any]:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user