Target & Stoploss child orders of bracket order automatically cancelled but parent order executed

My algo (.net based) placed a bracket order in which the parent order got executed, but the second leg orders of target and stoploss got automatically placed and cancelled due to Error 17070: The Price is out of the current execution range; even though the price was well within execution range as mentioned in the market depth window (lower & upper circuit).
The Main order in BO (Buy) was placed at 18.45 with a target of 19.35 and stoploss of 18.15

After execution of main order, second leg orders were place and closed immediately as under:
Stoploss order ->

Target Order->

The Market Depth showed the upper & lower circuits as under: -

My question is that why did the stoploss order get cancelled? The lower circuit was mentioned at 15.80 and in any case my SL order was placed at a much higher rate of 18.15. In general Kite automatically places the SL orders with the mentioned trigger price (in this case 18.15) and a price much lower than that but within the days range. This is something that is automatically calculated and executed by Kite backend server. It is not in the hands of the client to mention both the trigger as well as lower price. Then why did the order get cancelled?

Also, in such scenario, how does one close the stranded main order?

  • sujith
    You can check out this thread for details explanation.
  • MadanGoyal
    Thanks Sujith for the prompt reply and informative link. I understood the execution range. But I fail to figure out how to control the base price of the stop loss order (in second leg order) of a bracket order. What I mean is that when we place a BO, we just mention the execution price and the relative points of target and stop loss from the executed price. But I've noticed that a SL order has a trigger price and a limit price (well above/below the trigger price to ensure that the SL order is executed if triggered). This limit price is automatically calculated by Kite. In my above example also, the limit price of Rs 15.80 was automatically calculated and placed by Kite that apparently got rejected by NSE (thus throwing the 17070 error). Is there any workaround / explanation to prevent this from happening in future?
Sign In or Register to comment.