suppose i wanna buy IDEA ,price=40 , sl=36,tsl=2,target=42 i place the order : x=kite.place_order(variety="BO", exchange="NSE", tradingsymbol="IDEA", transaction_type="SELL", quantity=1, product="MIS", order_type="LIMIT", price=40, squareoff=42, stoploss=36, trailing_stoploss=2)
"x" gives the order id
*Now i wanna modify the sl to 38 , how do i do that ?
The way you are specifying the target and stop-loss is wrong. Check out this thread to know how to specify target and stop-loss values.
Now coming to the modifying part, once the first leg order is executed there will be a stop-loss order. You need to find the order id of that order and place a modify request with new price or trigger price.
kite.modify_order(variety=kite.VARIETY_BO, order_id=xxxxxx, order_type=kite.ORDER_TYPE_SL, trigger_price=xx)
worked for me for sl modification
i place the order :
x=kite.place_order(variety="BO",
exchange="NSE",
tradingsymbol="IDEA",
transaction_type="SELL",
quantity=1,
product="MIS",
order_type="LIMIT",
price=40,
squareoff=42,
stoploss=36,
trailing_stoploss=2)
"x" gives the order id
*Now i wanna modify the sl to 38 , how do i do that ?
Check out this thread to know how to specify target and stop-loss values.
Now coming to the modifying part, once the first leg order is executed there will be a stop-loss order.
You need to find the order id of that order and place a modify request with new price or trigger price.