Nifty 50 Number of stocks to trade — Tradetron Community
← Community

Nifty 50 Number of stocks to trade

Strategy 1,211 views

Paul

Dear Team

In the nifty 50 stocks, based on day opening i want to trade only 5 stocks to trade.

Which keyword i want to use to control number of stocks.

Thank you

Kumar Jatin

Add as below in Condition Builder
Open Position <= number(5)

Paul

Thank you very much for your quick reply

Kumar Jatin

You equally welcome and Best wishes for your strategy,
Good Luck

Paul

Its not limiting number of stocks in my strategy.

Tradetron Team Tradetron team

Use Open Positions in the Entry condition with AND, e.g. Open Positions < Number(5). It counts simultaneous open positions in a list strategy.

Known limit: if many stocks signal at the same condition check, they can all enter together and exceed the cap. The only fix then is a smaller list or a stricter entry condition.

If you want 5 entries in total for the day (not 5 open at once), use a runtime counter instead:

Use a runtime variable as a counter (there is no checkbox for this).

  1. In Initialize Variables, create a variable, e.g. s1entry, and set it to Number(1). Start at 1, not 0: a bare Get Runtime that reads 0 is treated as false and silently stops the condition.
  2. In the set’s Entry condition add Get Runtime(s1entry) <= Number(N) (N = the number of entries you allow; use == Number(1) for one entry only).
  3. In that entry’s Runtime section, increment it: s1entry = Get Runtime(s1entry) + Number(1).
  4. Use a separate variable per set if each set needs its own limit.
  5. Test in Live Offline first.

Note: a Universal Exit clears all runtime variables, and Initialize Variables are written again when a new run counter starts.

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.