Skip to content

Commit

Permalink
Make this less wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
brndnmtthws committed Jan 10, 2024
1 parent 61a0e97 commit 8be5abb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thetagang/portfolio_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ def make_order() -> tuple[Optional[Ticker], Optional[LimitOrder]]:
else self.config["orders"]["algo"]
)

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

Expand Down

0 comments on commit 8be5abb

Please sign in to comment.