From 4f2ce0c1a4593777c42c36cd21867ba61c5e91ba Mon Sep 17 00:00:00 2001 From: algizn97 Date: Wed, 1 Oct 2025 15:47:10 +0500 Subject: [PATCH] Added check tp sl price --- app/bybit/open_positions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/bybit/open_positions.py b/app/bybit/open_positions.py index 10c4371..3fd118d 100644 --- a/app/bybit/open_positions.py +++ b/app/bybit/open_positions.py @@ -382,6 +382,12 @@ async def open_positions( take_profit_price = max(take_profit_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 = { "category": "linear", "symbol": symbol,