Improve backtest performance
This commit is contained in:
@@ -191,7 +191,7 @@ def create_mock_trades(fee, use_db: bool = True):
|
||||
if use_db:
|
||||
Trade.session.add(trade)
|
||||
else:
|
||||
LocalTrade.trades.append(trade)
|
||||
LocalTrade.add_bt_trade(trade)
|
||||
|
||||
# Simulate dry_run entries
|
||||
trade = mock_trade_1(fee)
|
||||
|
@@ -1196,6 +1196,6 @@ def test_Trade_object_idem():
|
||||
# Fails if only a column is added without corresponding parent field
|
||||
for item in localtrade:
|
||||
if (not item.startswith('__')
|
||||
and item not in ('trades', )
|
||||
and item not in ('trades', 'trades_open', 'total_profit')
|
||||
and type(getattr(LocalTrade, item)) not in (property, FunctionType)):
|
||||
assert item in trade
|
||||
|
Reference in New Issue
Block a user