with regular order i tried stoploss and squaroff but only stoploss is placed

ashuthinks
i'm using python code first i execute buy and then in second order i want to place stoploss and target.

last_price = kite.ltp("NSE:TATASTEEL")["NSE:TATASTEEL"]['last_price']
stoploss_price = last_price - 10
trg_price = last_price + 10
order_id = kite.place_order(tradingsymbol="TATASTEEL",
exchange=kite.EXCHANGE_NSE,
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=1,
order_type=kite.ORDER_TYPE_MARKET,
product=kite.PRODUCT_MIS,
variety = kite.VARIETY_REGULAR)

kite.place_order(tradingsymbol="TATASTEEL",
exchange=kite.EXCHANGE_NSE,
transaction_type=kite.TRANSACTION_TYPE_SELL,
quantity=1,
price=stoploss_price,
trigger_price= stoploss_price,
squareoff=trg_price,
order_type=kite.ORDER_TYPE_SLM,
product=kite.PRODUCT_MIS,
variety = kite.VARIETY_REGULAR)

unable to see squareoff price is placed please help thanks
  • sujith
    The square-off field is only for bracket order. You can know more about the stop-loss order here.
  • ashuthinks
    ashuthinks edited October 2020
    Ohh I see I do not want to use bracket order I think if market is voltile it will not enabled.

    Is there any way to set square off i.e. target similar to above code ? Thanks
  • sujith
    You need to place two orders independently one is limit and another is stoploss.
This discussion has been closed.