@Tradehull_Imran dear please check my code for trailing stoploss
# Adjust SL Based on Trade Type
if trade[“type”] == “BUY”:
new_trailing_sl = last_price - sl_points # SL moves UP for LONG trades
if new_trailing_sl > old_sl: # Ensure SL moves in the right direction
try:
tsl.modify_order(order_id=trade[‘sl_order_id’],stop_loss=new_trailing_sl)
trade[“sl”] = new_trailing_sl
print(f" Updated SL for {stock_name}: {old_sl} → {new_trailing_sl}")
Hi @prajak_amrute ,
On high level the code seems to be right.
for order modify code right
how can i place super order ?