Number of entries in both sets — Tradetron Community
← Community

Number of entries in both sets

Uncategorized 1,106 views

Avinash Mangalaram

I want set total no. of entries to 5 including both set no 1 and 2, how to make it?

Lion Algos

Above condition for Nifty to restrict no. of Entry to 5.

Tradetron Team Tradetron team

Use one shared counter for both sets:

  1. Initialize entries = Number(1).
  2. In both entry conditions add Get Runtime(entries) <= Number(5) with AND.
  3. In both entries’ Runtime Variable section: entries = Get Runtime(entries) + Number(1).

The counter starts at 1 and goes up by 1 after each entry from either set, so entries 1 to 5 pass and the 6th is blocked.

Example: Set 1 enters (counter 1 → 2), Set 2 enters (2 → 3), Set 1 enters twice more (→ 5), Set 2 enters (→ 6). Now 6 <= 5 is false, so neither set can enter again in this run.

Start at 1, not 0, and always wrap values in Number(...). Check the current count from the deployment’s ⋮ menu → Runtime Data. A Universal Exit resets the variable. Test it in Live Offline before going live.

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