I am trying to place target and stop loss order through python, and only see target order being placed. While the stop loss is not being placed at all. How to place both after i successfully take a position.
thanks @SRIJAN for letting me know that we can place two sell orders after position. Can you point me to the correct parameters required for placing stop loss, i am using the below command.
Order_type would be SL or SLM not LIMIT. If you use sell LIMIT ,and use price below cmp as you are placing sl,it will become a market order and filled immediately. Also,know that you can place both target and sl at once if you have enough margin for second order. Because you can place one squareoff order without paying extra margin. If you don't have extra margin,better use gtt orders.
kite.place_order(variety="regular", exchange=kite.EXCHANGE_NFO,
tradingsymbol=PE_symbol,
transaction_type=kite.TRANSACTION_TYPE_SELL,
quantity=position_quantity,
order_type=kite.ORDER_TYPE_LIMIT,
product=kite.PRODUCT_MIS, price=stop_loss)
@sujith