How to stop a strategy re-entering again and again within minutes — Tradetron Community
← Community

How to stop a strategy re-entering again and again within minutes

Strategy 2,437 views

Ujjwal

I had kept ORB between 10 and 10.15 for Maruti. It seems there were paper trades taken during that period and continuous trades are there. What am I missing ??? How to restrict this

Umesh Ranglani Tradetron team

Use this to restrict position, This is for buy set if you are using Sell set in the same strategy copy the same just use “S” in-place of “B” for that set

Tradetron Team Tradetron team

Your entry condition has no gate, so every time it is true again (after an exit) the strategy re-enters. There is no checkbox for this; you limit entries with a runtime variable used as a counter.

Allow only one entry

  1. Create an Initialize Variable s1entry = Number(1).
  2. In the entry condition add Get Runtime(s1entry) == Number(1) with AND to your ORB logic.
  3. In that entry’s Runtime Variable section set s1entry = Number(2).

After the first entry the check is false, so no second trade in that run counter. If you have a separate Sell set, use its own variable (e.g. s2entry).

Allow up to N entries

  1. Create an Initialize Variable, e.g. s1entry = Number(1).
  2. In the entry condition, add Get Runtime(s1entry) <= Number(N) and join it to your real entry logic with AND.
  3. In the entry’s Runtime Variable section, write s1entry = Get Runtime(s1entry) + Number(1).

Start at 1, not 0, and always wrap values in Number(...). A Universal Exit kills all runtime variables, so the count starts again after one fires.

Test it in Live Offline before going live. Check the Notification Log to confirm only the expected entries fired. Keyword reference: Keyword Documentation — Tradetron

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