Subject: asking for Smart Exit Feature Based on Combined Position P&L

Dear zerodha Support Team,

I hope this message finds you well.

I am an active trader on your platform and would like to inquire about the availability of a Smart Exit or Secure Exit feature that allows automatic square-off of positions based on the combined P&L of multiple legs.

Specifically, I am looking for a functionality where:
• I can hold multiple positions (for example, a Buy and a Sell leg),
• Set a trigger such that when the net MTM profit of the entire position reaches a predefined level (e.g., ₹800),
• The system automatically squares off all open legs and books the profit.

Could you please confirm whether this feature is available on your platform? If not, is there any integration with third-party platforms or APIs through which this can be implemented?

Looking forward to your response.

Not yet available, but in our list of things to provide with top priority.

Any dates for lunch this feature?

Though due to heavy M2M spikes, especially at market open, I’d prefer the exit to be executable only at candle close [5mtf / 15mtf].

Totally agree with you,

but this feature is stress free for newbie users.
You can set your preferred gain and loss when each side triggers square off whole position.
It Is a good Risk management features !

Some brokers have this feature

@siva does zerodha offer this types of advance risk management tool in future ?

Yes, we will.

When we expect this feature ?
this is essential risk management tool not only for newcomers all traders have good benifit from this feature

In few months, can’t give exact ETA.

any ETA on this ?

As mentioned this is a big change so will take time.

@Shubha_dip
Feel free to explore my python script which does MTM based square off. algo_trading_strategies_india/broker-utilities/mtm_square_off_zerodha at main · buzzsubash/algo_trading_strategies_india · GitHub

The directory has some sample logs as well, which I have used for testing in my account. mtm_monitor.log is the one you might be interested, start reading from line number 875.

For option sellers, I have added logic to exit sell positions first, followed by buy legs to avoid any margin limit breaches.

1 Like

It’s been more than a year…you have some ETA ?

1 Like

@Shubha_dip

Any ETA ?