How can I limit no of trades per day to a certain no of times? — Tradetron Community
← Community

How can I limit no of trades per day to a certain no of times?

Keyword help 5,531 views

Ujjwal

how can I limit no of trades per day to a certain no of times like I bought when close(-1)>vwap(-1) and exit and entry condition satisfied again exits again
How about position details keyword

Umesh Ranglani Tradetron team

you can list the long & short to 1 trade using position detail by putting
position detail(Entry, B, All , Quantity, underlying) == number(0) in the buy side
position detail(Entry, S, All , Quantity, underlying) == number(0) in the Short side

however, for an x amount of trades you will have to take the python route.

Tradetron Team Tradetron team

Yes. Position Detail can stop a second entry while a position is open, but to cap the number of trades per day you need a counter.

Use a runtime variable as a counter

There is no checkbox for this. You build it with a runtime variable.

  1. In Initialize Variables, create a variable, e.g. s1entry, and set it to Number(1).
  2. In the Entry condition add: Get Runtime(s1entry) <= Number(N) (N = max entries, e.g. 3).
  3. In that Entry’s Runtime section, increment it: s1entry = Get Runtime(s1entry) + Number(1).
  4. For “only once”, check Get Runtime(s1entry) == Number(1) and set it to Number(2) in the runtime.

Start at 1, not 0: a bare Get Runtime(...) that reads 0 is treated as false and the condition silently never fires. Always wrap values in Number(...). A Universal Exit clears all runtime variables, so the counter resets when the strategy re-initialises (for intraday, next day).

Test it in Live Offline first. 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.