Skip to content

Commit 03098a9

Browse files
committed
Fix trade status conversion
1 parent 408bb0a commit 03098a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

investing_algorithm_framework/services/backtesting/backtest_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def create_vector_backtest(
287287
closed_at=None,
288288
amount=amount,
289289
net_gain=0,
290-
status=TradeStatus.OPEN,
290+
status=TradeStatus.OPEN.value,
291291
cost=capital_for_trade
292292
)
293293
trade.updated_at = current_date
@@ -302,7 +302,7 @@ def create_vector_backtest(
302302
last_trade.closed_at = current_date
303303
last_trade.updated_at = current_date
304304
last_trade.net_gain = net_gain_val
305-
last_trade.status = TradeStatus.CLOSED
305+
last_trade.status = TradeStatus.CLOSED.value
306306
order = Order(
307307
id=uuid4(),
308308
target_symbol=symbol,

0 commit comments

Comments
 (0)