How to trigger Set Exit or Universal Exit when 1 leg is squared off with Repair Once — Tradetron Community
← Community

How to trigger Set Exit or Universal Exit when 1 leg is squared off with Repair Once

Uncategorized 6,957 views

Nelson Tradetron team

In this thread, we will deal with following issue:

Issue:
Repair Once works only one time in a strategy before Set Exit or Universal Exit Happens in a Strategy.

So in a Short Straddle or a Short Strangle Strategy, often after the first Stoploss or Target is hit using Repair Once condition, the set may Re-enter again as the net quantity of both legs is nil, since SL or target of both legs has triggered.
However, after the Re-entry, the Repair Once, used to trigger SL or Target will not trigger the 2nd time. This is because before the re-entry happens again, The Set Exit or Universal Exit needs to trigger first. Then only Re-entry needs to happen.

When Re-entry happens after Set Exit or Universal Exit is triggered, it will automatically trigger the Repair Once again, this can then continue for however many times you wish in your strategy.

So in below example, we will construct a simple Short Straddle Strategy, and we will trigger 1st SL or Target of either of the legs using Repair Once, and 2nd SL or Target will be done by using Universal Exit. This will enable smooth Re-entry procedure.

Nelson Tradetron team
  1. So first lets create simple Entry condition, to enter a short ATM straddle at 9.30 am.

This condition will be followed with following “Position Builder” for ATM Straddle:
For Short ATM Call:

For Short ATM Put:

Nelson Tradetron team
  1. Now this will be followed by Simple Repair Once Condition, where,
    We tend to exit the 1st Leg Shorted at 10% higher than Entry Price.
    Also, we want to make sure that 2nd leg is still open, since we will exit that leg from universal exit.

So the Repair Once 1st Condition will look like below:

image

And Position Builder for the same will look like below:

With Strike Fx Formula as :

Nelson Tradetron team
  1. Similarly, this will be followed by another Repair Once (second) Condition, where,
    We tend to exit the 2nd Leg Shorted at 10% higher than Entry Price.
    Also, we want to make sure that 1st leg is still open, since we will exit that leg from universal exit.

So the Repair Once 2nd Condition will look like below:
image

And the corresponding “Position Builder” will look like below:

with strike Fx as below:

Nelson Tradetron team
  1. Now for the most Important part, we will trigger Universal or Set Exit based on one of the following 3 criteria:

a) Time Exit of 3 PM (OR)
b) Exiting the 1st Leg, when 2nd leg has Net Quantity = 0, which means 2nd leg has got exited through Repair Once mentioned above. (OR)
c) Exiting the 2nd Leg, when 1st leg has Net Quantity = 0, which means 1st leg has got exited through Repair Once mentioned above.

So together Universal Exit or Set Exit will look like below:

image


Bhavesh Savla

In Universal Exit condition,
isn’t it LTP should be less than 10% lower than buy price?
i.e. LTP < entry price * 0.90

Because, we sell the instrument and to gain profit we should buy lower.

Please correct me if I’m wrong. I am bit confused with this.

Nelson Tradetron team

The above example is of Short Straddle. and buying is the squareoff with stoploss of 10%. Hence it is that way.

For Target yes, your formula would be right.

Thanks

arpit tiwari

I understand that for repair once to work properly in reentry you have written the universal exit like this but in your universal exit the 2nd leg is forcefully exited if the first leg SL is hit.
I don’t want to exit my 2nd leg unless the SL of 10% is hit.
Also I want repair once to work as usual in reentry also.
Is it already taken care of in universal repair? Am i understanding it correctly?

Tradetron Team Tradetron team

Answering #8: you can keep the second leg running until its own stop is hit. Trigger the Set Exit only when both legs are flat, instead of when one of them is.

Why the set must exit at all

A Repair Once fires once and is not checked again until a set exit or universal exit happens. To get fresh Repair Once SLs after a re-entry, the set has to exit in between.

Set Exit that doesn’t force-close the other leg

Set Exit (OR):

  • Time ( NSE ) >= 1500, or
  • Net Quantity ( leg 1 ) == Number ( 0 ) AND Net Quantity ( leg 2 ) == Number ( 0 ), meaning both Repair Once SLs have fired.

With this, an SL on leg 1 leaves leg 2 open with its own 10% SL. When leg 2 also stops out, the set exits, and the next entry gets fresh Repair Once blocks.

Note: Net Quantity is strategy-wide for that instrument, not set-level. Test in Live Offline.

:sparkles: Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.