mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
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_start -= 1
|
||||
open_trades[pair].remove(t)
|
||||
LocalTrade.trades_open.remove(t)
|
||||
LocalTrade.remove_bt_trade(t)
|
||||
self.wallets.update()
|
||||
|
||||
# 2. Process entries.
|
||||
|
|
|
@ -1077,6 +1077,10 @@ class LocalTrade():
|
|||
else:
|
||||
LocalTrade.trades.append(trade)
|
||||
|
||||
@staticmethod
|
||||
def remove_bt_trade(trade):
|
||||
LocalTrade.trades_open.remove(trade)
|
||||
|
||||
@staticmethod
|
||||
def get_open_trades() -> List[Any]:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user