Remove redundant short selling block and restore sell execution logic

This commit is contained in:
Justin Oros
2026-02-04 16:05:13 -07:00
parent 2d3ff2a58f
commit b64dc50ece
+6 -3
View File
@@ -1006,9 +1006,12 @@ def main():
else: else:
execution_price = submit_market_buy(SYMBOL, position_size) execution_price = submit_market_buy(SYMBOL, position_size)
elif signal == 'sell': elif signal == 'sell':
logger.warning("⚠️ Sell signal ignored - short selling not allowed with cash account") if USE_LIMIT_ORDERS:
debug_print("Short selling blocked for cash account") bid, ask = get_bid_ask(SYMBOL)
signal = None 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: if execution_price:
trade_count += 1 trade_count += 1