From b765102b8b382dd35f92fe2804e573540324415d Mon Sep 17 00:00:00 2001 From: Nawaz Haider Date: Fri, 2 Jan 2026 16:08:23 +0600 Subject: [PATCH] Update trading conditions to ensure anchor orders are placed only when ask prices are favorable --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 8cf0412..3b556bb 100644 --- a/main.py +++ b/main.py @@ -83,7 +83,7 @@ async def main(): if trades < MAX_TRADES: trading_side = book.last_signal - if trading_side == SIGNALES.UP: + if (trading_side == SIGNALES.UP) and (up_ask_price < down_ask_price): await place_anchor_and_hedge( up_token, down_token, @@ -96,7 +96,7 @@ async def main(): f"Placed UP anchor and hedge orders. Total trades: {trades}" ) - elif trading_side == SIGNALES.DOWN: + elif (trading_side == SIGNALES.DOWN) and (down_ask_price < up_ask_price): await place_anchor_and_hedge( up_token, down_token,