Repair once not taking position depsite condition being satisfied — Tradetron Community
← Community

Repair once not taking position depsite condition being satisfied

Strategy 960 views

Bhumi

HI,
I have created a strategy using conditions in set entry, repair once and exit condition.
Repair condition is as follows fixing target at 6% and SL at 3%.

The strategy is taking position based on entry condition but after that, it doesn’t square off based target or SL conditions given in Repair once even though SL conditions are satisfied.

Notification log shows as follows.

VWAP ( Traded Instrument Name ( ‘7958848’, ‘1’, ‘Entry’, ‘instrument’, ‘NIFTY BANK’, ‘1’, ‘1’, ‘1’ ) , ‘LTP’ ) : 196.8
VWAP ( Traded Instrument Name ( ‘7958848’, ‘1’, ‘Entry’, ‘instrument’, ‘NIFTY BANK’, ‘1’, ‘1’, ‘1’ ) , ‘LTP’ ) : 196.8
Traded Instrument Name ( ‘7958848’, ‘1’, ‘Entry’, ‘instrument’, ‘NIFTY BANK’, ‘1’, ‘1’, ‘1’ ) : OPTIDX_BANKNIFTY_20JUL2023_PE_45100
Traded Instrument Name ( ‘7958848’, ‘1’, ‘Entry’, ‘price’, ‘NIFTY BANK’, ‘1’, ‘1’, ‘1’ ) : 227.3000030517578
Number ( ‘1.03’ ) : 1.03
Traded Instrument Name ( ‘7958848’, ‘1’, ‘Entry’, ‘instrument’, ‘NIFTY BANK’, ‘1’, ‘1’, ‘1’ ) : OPTIDX_BANKNIFTY_20JUL2023_PE_45100
Traded Instrument Name ( ‘7958848’, ‘1’, ‘Entry’, ‘price’, ‘NIFTY BANK’, ‘1’, ‘1’, ‘1’ ) : 227.3000030517578
Number ( ‘0.94’ ) : 0.94

As it can be seen, LTP is below the 6% target (‘below’ because it’s Short position) set in Repair once condition. However position is still carried on.

Tradetron Team Tradetron team

A Repair Once fires only when its own condition is true, and it needs a leg action that actually squares off the position. From your log, check these:

  1. The action: the Repair Once must contain a position that exits the entry leg (same instrument, opposite side, same quantity), or a Leg Exit keyword pointing at it.
  2. The reference: build the target/SL from the traded leg with Traded Instrument (field price) using the right Entry, set, condition and leg number. Follow the recommended structure: Recomended Structure for Get runtime, Traded instrument, Traded instrument name keyword. | Tradetron Helpdesk
  3. Target and SL with OR: e.g. LTP >= price × Number(1.06) OR LTP <= price × Number(0.97). With AND, both must be true at once, which never happens.
  4. Keywords in the condition: your log shows VWAP on the traded instrument. VWAP needs volume, so check it returns a value in the Notification Log.

Simpler option

Use Leg Exit in the Repair Once with a fixed stop/target in points or percent.

Test in Live Offline and read the Notification Log to see what each part evaluated to.

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