How will NSE's self-trade prevention mechanism affect Bracket Orders & Cover Orders?

I’ve faced scenarios where sometimes my orders have been canceled due to the self trade prevention mechanism. I want to know how bracket orders and cover orders will be affected.

NSE in 2015 introduced this mechanism to prevent self-trade for a client who has both buy and sell orders open for a certain scrip at the same price. The details of the mechanism are covered in this NSE document.

In case of BO/CO, the position will be left hanging with either no target or SL order, if the client places a counter order matching the BO/CO Stoploss or Target orders.

Ex: you place a buy BO at 100 with SL at 98 and target at 104 and then place a sell BO 102 with SL at 104 and target at 98. In this case, your TGT & SL will be canceled and the position will be left hanging.

Another scenario is when you place a buy BO with the entry price above the current market price or place a sell BO with the entry price below the current market price.

In such cases, if the market is volatile and the entry order is executed partially, the entry order for the pending quantity could try to match against your TGT or SL order, and thus get cancelled.