How does NSE prevent self-trade?

NSE prevents self-trade (traders who have multiple open for a scrip and are likely to match with each other) using a mechanism. If an active comes in and is likely to match with any passive unmatched orders in the system, in the same order book belonging to the same client, then either the active or passive order will be cancelled by the exchange.

Note: This is applicable for all Day and IOC order types; limit, market, stop loss, and stop loss-market.