Repair Once and Repair Continuous in Tradetron, Explained
In Tradetron, a repair condition changes a position you already hold, without waiting for the set's exit. Repair Once fires one time per entry: use it to exit a single leg, add a hedge, or roll a strike. Repair Continuous fires on every check while its condition is true: use it for repeated adjustments, and always give it a limit.
Repair Once vs Repair Continuous on Tradetron, and why every repeating repair needs a brake, in 3 minutes. हिन्दी में देखें: Tradetron पर Repair Once और Repair Continuous का फ़र्क, 3 मिनट में

Where repairs fit in a strategy
A Tradetron strategy is made of sets. Each set has conditions of different types:
The layout of a set: entry conditions, positions, then Repair and Exit. This set sells an ATM straddle; the worked example below buys a strangle instead
| Condition type | What it does | Fires |
|---|---|---|
| Entry | Opens the set's positions | Once, then waits for the exit |
| Repair Once | Adds, removes or changes a leg | Once per entry |
| Repair Continuous | Adds, removes or changes a leg | Every check while true |
| Exit | Closes everything the set opened | When true, once positions are open |
| Universal Exit | Closes the whole strategy | When true |
The order inside a set is Entry, then repairs, then Exit. A repair only runs while the set's entry is active.
A multi-leg strategy takes several positions for one entry: for example, a strangle buys a call and a put at different strikes. Repairs are what let you treat those legs separately, so one leg can be closed while the other keeps running.
Repair Once vs Repair Continuous
The difference is how often the repair can fire.
The same condition, read by Repair Once and by Repair Continuous
Repair Once fires the first time its condition is true. It then stays quiet until the set exits and enters again. It is the right choice for one-time actions:
- Exit a leg when it hits its stop loss.
- Add a hedge leg the first time the market moves against you.
- Roll a short strike once a level is breached.
Repair Continuous is checked again on every cycle, and fires every time it finds the condition true. It suits actions that must repeat:
- Add one lot every time the price moves another 50 points in your favour (pyramiding).
- Re-hedge with futures each time the strategy's Net Delta drifts outside a band.
- Re-enter a stopped-out leg each time its premium comes back to the entry price.
The keywords repairs depend on
Traded Instrument
Returns a value from a position you already took. Its inputs:
- Condition Type: where the leg was opened: Entry, Repair Once or Repair Continuous
- Field: price, strike, quantity, P&L or time
- Underlying: for example NIFTY 50
- Set Number, Condition Number, Leg Number: the exact leg
So Traded Instrument (Entry, price, NIFTY 50, 1, 1, 1) is the entry price of leg 1 of the first entry condition in set 1.
The Traded Instrument keyword
Its inputs
Traded Instrument Name works the same way but returns the instrument itself (or its expiry). Put it inside LTP and you get the live price of exactly the option you bought.
ATM
Returns the at-the-money strike, or a strike a given number of steps away. ATM uses the futures price; ATM SPOT uses the spot index price and is the usual choice for the weekly NIFTY expiry.
The ATM keyword
Underlying and number of steps
| Steps | For a call (CE) | For a put (PE) |
|---|---|---|
| +1, +2, +3 | Out of the money | In the money |
| 0 | At the money | At the money |
| −1, −2, −3 | In the money | Out of the money |
Steps count strikes away from ATM on the option chain
Open Positions Detail
Reads what is open right now. With the field set to count, it returns how many instruments are still open; closed legs drop out completely. That makes it the cleanest way to ask "are both legs still on?" The older Positions Detail keyword also reads quantity and value, including for positions that have closed.
Worked example: a NIFTY long strangle with one-leg stops
Here is the strategy we will build:
A long strangle profits from a big move in either direction. It loses if the market stays quiet, as both options lose value with time.
Step 1: the entry
Entry: a time window at the open
In the position builder, choose the option details and, in the strike field, pick Fx to open the Formula Builder. There, use the ATM keyword with +2 for the call and −2 for the put.
Fx opens the Formula Builder for the strike
Two strikes out of the money
The two entry legs
Step 2: a Repair Once for the call's stop loss
The call is leg 1 of the first entry condition in set 1. Its stop condition reads:
LTP of Traded Instrument Name (Entry, instrument, NIFTY 50, 1, 1, 1) ≤ Traded Instrument (Entry, price, NIFTY 50, 1, 1, 1) × 0.95
In words: the call's live price is at or below 95% of the price you paid.
Repair 1: the call's 5% stop
In this repair's position builder, add the opposite trade, a sell of the same call. For the strike, use Fx with Traded Instrument and Field = strike, so it squares off exactly the strike you bought rather than today's ATM + 2.
Same strike as the one you entered
Repair 1 closes the call
Step 3: a second Repair Once for the put
The put is leg 2 of the same condition, so the numbers become set 1, condition 1, leg 2, in both the stop condition and the strike formula.
Repair 2: the put's 5% stop
Repair 2 closes the put
Step 4: stop the second repair once the first has fired
As built so far, both legs could be stopped out. The rule says only the first stop should act; the surviving leg should run to the Universal Exit.
Add one more clause to both repairs, joined with AND:
Open Positions Detail (All, All, NIFTY 50, count) = 2
While both legs are open, the count is 2 and either stop can fire. Once one leg is closed, the count drops to 1, so the other repair can no longer trigger.
Step 5: the Universal Exit
Finish with a Universal Exit, such as a fixed time before the close, so whatever is still open is squared off.
Universal Exit closes whatever is left
Common mistakes with repairs
| Mistake | What happens | Fix |
|---|---|---|
| Repair Continuous with no limit | Trades on every check until the deployment is Blocked | Gate it with a runtime variable or a condition that turns false after firing |
| Wrong leg number | The stop watches the other leg | Count legs in the order they appear in the entry |
| Strike from ATM instead of Traded Instrument | The square-off sells a different strike and opens a new position | Use Traded Instrument, Field = strike |
| Hard-coded quantities | Breaks when the lot size changes | Use counts, or Traded Instrument with Field = quantity |
| Entry and exit true at the same time | The set opens and closes in a loop | Make the exit the opposite of the entry, or add a guard |
Keep going with keywords in Tradetron, logical operators, Advanced Settings and how to debug a strategy.
Frequently asked questions
What is the difference between Repair Once and Repair Continuous in Tradetron?
Repair Once fires the first time its condition is true and then waits until the set exits and enters again. Repair Continuous is checked on every cycle and fires every time its condition is true, so it can act many times during one entry.
When should I use Repair Continuous?
Use it for actions that must repeat during a trade, such as adding a lot at each new price step, re-hedging when delta drifts, or re-entering a stopped leg. Always add a limit, such as a runtime variable it updates or a counter it caps.
Why did my strategy go to Blocked after adding a repair?
The most common cause is a Repair Continuous whose condition stays true, so it trades on every check. The other is an entry and an exit that are both true at once. Add a gate to the repair, or make the entry and exit mutually exclusive.
How do I exit only one leg of a multi-leg strategy?
Add a Repair Once with the leg's exit condition, and in its position builder place the opposite trade on the same instrument. Use Traded Instrument with Field = strike (and Traded Instrument Name for the expiry) so it closes exactly the leg you entered.
What does Traded Instrument return?
It returns a value from a position you already took: its price, strike, quantity, P&L or time. You choose which leg with the condition type, set number, condition number and leg number.
Can I backtest strategies that use repairs?
Yes. Repairs are part of the strategy logic, so they run in a Tradetron backtest the same way they run live. Check the backtest's trade list to confirm each repair fired when you expected.