Modify BO Stoploss orders


I want to modify BO sl orders.
I found order id, parent order id and exchange order id in order book. Which order id should I use with "ModifyBOSl(OrderId, TrgPrice)" function. I tried with all the three order numbers but got errors like "Order is not a BO Stoploss order", "OrderId is not found". Please reply.
  • HowUTrade

    You should pass the order id of the stoploss.

    For the error, this may be due to the one of the reasons mentioned below;

    1. You are passing Invalid order id (Error: OrderId is not found)
    2. You are passing Wrong order id (Error: Order is not a BO Stoploss order. Like Id of BO main order, or BO target order or other product)
    3. Your Stop-loss order is triggered. (Error: Order is not a BO Stoploss order. Once a stoploss order is triggered, it is converted to LIMIT order. Since this function expects the order type to be 'SL', but it is now LIMIT hence throws error. If this is the case, you can safely assume that the BO is closed and ignore error)
    4. Order update is not received from Kite Server (Error: OrderId is not found)
  • ZZ8030
    ZZ8030 edited January 30

    I have tried with all the three orders with ModiyBOSL, but still get those errors. Could you please provide some vba code so that I could directly use it. Modifying the BO stoploss orders is important part of my trading style, so I desperately need it. Please reply.
  • ZZ8030
    Is there any specific format to use ModifyBOSL function?
  • HowUTrade
    HowUTrade edited January 30

    Looks like, you are using old DLL.
    Could you install latest DLL from here and try?

    For testing, you can just use the ModifyOrder window from dashboard sheet.
    Try modifying the BO stoploss order using ModifyOrder window.
  • ZZ8030
    HI HowUTrade,

    I downloaded the latest DLL from the link, still have the problem.

    Could you please make changes in ExitBOPositions or modifyBOSL vba in such a way that if I call this vba it will change the limit price of all SL orders few ticks away from LTP. (We can make this new SL limit price in adjacent to Order_ID column in Dashboard order sheet)

    The function I need is when I reached a net profit position I want to modify sl orders of BO orders at few points away from ltp so that I could secure my profit position. Since I place so many orders it is difficult to modify all orders manually. Please help.

Sign In or Register to comment.