diff --git a/thetagang/portfolio_manager.py b/thetagang/portfolio_manager.py index 69ebd7667..656bb4ea8 100644 --- a/thetagang/portfolio_manager.py +++ b/thetagang/portfolio_manager.py @@ -1766,7 +1766,7 @@ def make_order() -> tuple[Optional[Ticker], Optional[LimitOrder]]: ) amount = cash_balance - target_cash_balance - price = ticker.ask + price = ticker.ask if amount > 0 else ticker.bid qty = amount // price if qty > 0: