Added check tp sl price

This commit is contained in:
algizn97
2025-10-01 15:47:10 +05:00
parent 3ae8c15007
commit 4f2ce0c1a4

View File

@@ -382,6 +382,12 @@ async def open_positions(
take_profit_price = max(take_profit_price, 0) take_profit_price = max(take_profit_price, 0)
stop_loss_price = max(stop_loss_price, 0) stop_loss_price = max(stop_loss_price, 0)
if take_profit_price < price_symbol:
take_profit_price = None
if stop_loss_price > price_symbol:
stop_loss_price = None
# Place order
order_params = { order_params = {
"category": "linear", "category": "linear",
"symbol": symbol, "symbol": symbol,