From b64dc50ece98183874aeef3eb45f979a4db8d16a Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Wed, 4 Feb 2026 16:05:13 -0700 Subject: [PATCH] Remove redundant short selling block and restore sell execution logic --- alpaca_trader/engine.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/alpaca_trader/engine.py b/alpaca_trader/engine.py index 8f64a33..7153479 100644 --- a/alpaca_trader/engine.py +++ b/alpaca_trader/engine.py @@ -1006,9 +1006,12 @@ def main(): else: execution_price = submit_market_buy(SYMBOL, position_size) elif signal == 'sell': - logger.warning("⚠️ Sell signal ignored - short selling not allowed with cash account") - debug_print("Short selling blocked for cash account") - signal = None + if USE_LIMIT_ORDERS: + bid, ask = get_bid_ask(SYMBOL) + limit_price = ask + execution_price = submit_limit_short_sell(SYMBOL, position_size, limit_price) + else: + execution_price = submit_short_sell(SYMBOL, position_size) if execution_price: trade_count += 1