Skip to content

Commit 8be5abb

Browse files
committed
Make this less wrong
1 parent 61a0e97 commit 8be5abb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

thetagang/portfolio_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ def make_order() -> tuple[Optional[Ticker], Optional[LimitOrder]]:
18511851
else self.config["orders"]["algo"]
18521852
)
18531853

1854-
amount = cash_balance - (target_cash_balance + pending_balance)
1854+
amount = cash_balance + pending_balance - target_cash_balance
18551855
price = ticker.ask if amount > 0 else ticker.bid
18561856
qty = amount // price
18571857

0 commit comments

Comments
 (0)