Exit order getting triggered rather then sending market order — Tradetron Community
← Community

Exit order getting triggered rather then sending market order

Strategy 910 views

Prabhat Mittal

Hi, I created a strategy in which options are sold on the basis of market timing. I then send stop-loss market orders immediately using repair once without any condition.

In the paper trading though it shows that exit condition is triggered rather than sending stop loss market order and then again entry is created.

Is this expected behavior?

Tradetron Team Tradetron team

In Tradetron, exits are driven by conditions. The engine checks your conditions and sends the order when one is met.

If a Repair Once has no condition, it is true right away, so it fires immediately after entry. If your exit (or Universal Exit) is also true, the strategy exits and the entry condition, still true, enters again. That is the loop you’re seeing.

Fix:

  1. Give the stop-loss a real condition, e.g. in Repair Once: LTP(Traded Instrument) >= Traded Instrument entry price + 30 (for a short option), and set that block’s position to exit the leg.
  2. Stop re-entry with a runtime-variable counter: initialise s1entry = Number(1), add Get Runtime(s1entry) == Number(1) to the entry, and set s1entry = Number(2) in the entry’s runtime section.
  3. For a trailing SL on one leg, use Leg TSL in Repair Once.

Repeated entry/exit loops can get a strategy blocked (400 trades/day guard), so test in Live Offline first.

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