Cancel all open orders from brackets

I have been trying to figure this out for a while now. I would like a feature that can be turned on so that when a market order has been placed, it also cancels out all open orders that are left from the bracket.

For example: when my bot places a BUY market order with only a take profit of 25 ticks, if the TP isn’t reached and my bot needs to exit the position, it places a SELL market order. HOWEVER, now that take profit of 25 ticks is still open and on the DOM from when my bot first placed a BUY market order.

Is there some way all orders from the bracket can be cancelled out automatically when a new order is placed?

@BWeis if we could please have this feature that would literally be amazing, then my bot could actually work.

Using our API you can call the /orderStrategy/interruptOrderStrategy endpoint with the id of the OrderStrategy that you want to cancel the legs for. When your bot decides to place the market order, add an interruptOrderStrategy call as well.

Hi, thanks for your response.

The only issue is that I am using webhooks and they are actually working very well with tradovate/tradingview. I am not using the API so that is why I want to know if there’s any other way. This should be an option we could select.

Ah I see, is a third party software or another developer involved? Last I knew webhooks did not natively support calls to the Tradovate API but that may have changed recently considering the number of API developers that had projects on the map to tackle exactly that issue. You may want to contact TradingView (if they have native support now) or whatever third party dev is running that project. Ask them if there is a way to modify the call your bot makes using webhooks, as it is entirely possible to interrupt an order strategy from code.

Hi!

Thanks so much for that information. It’s actually a program that a friend and I built. It isn’t connected with the API in anyway.

I am not proficient in python, so unfortunately I may need to find someone that can help do that. Thanks for your help!