How to restrict Number of positions taken when Entry condition satisfies multiple stocks in List (e.g. Nifty 50))
Strategy3,955 views
Sagar Vilas Varsolkar
I have created strategy to take intraday position in Nifty 50 stocks when Entry criteria satisfies.
Now say entry criteria satisfies for multiple stocks in the List but I just want to take position only in first stock that satisfies the criteria.
Can you tell me how can we do that?
My Simple intraday strategy is -
First 1 hour candle touches or crosses the previous day Low but eventually closes above previous day low. and then after that if any 15 minutes candle gives closing above VWAP.
then enter into trade.
My Entry condition is -
( Time ( ‘NSE’ ) >= Number ( ‘1016’ ) ) and ( Position ( LOW ( Symbol ( Instrument Name ( ‘NSE,|NIFTY 50|,’ ) , ‘1h’, ‘All’ ) ) , ‘-1’ ) <= Position ( LOW ( Symbol ( Instrument Name ( ‘NSE,|NIFTY 50|,’ ) , ‘day’, ‘All’ ) ) , ‘-1’ ) ) and ( Position ( CLOSE ( Symbol ( Instrument Name ( ‘NSE,|NIFTY 50|,’ ) , ‘1h’, ‘All’ ) ) , ‘-1’ ) > Position ( LOW ( Symbol ( Instrument Name ( ‘NSE,|NIFTY 50|,’ ) , ‘day’, ‘All’ ) ) , ‘-1’ ) ) and ( Position ( CLOSE ( Symbol ( Instrument Name ( ‘NSE,|NIFTY 50|,’ ) , ‘15m’, ‘All’ ) ) , ‘-1’ ) > Position ( VWAP Series ( Instrument Name ( ‘NSE,|NIFTY 50|,’ ) , ‘15m’ ) , ‘-1’ ) )
Raghu
@Nelson or anybody from Tradetron - can you please answer the above ? Is this possible ? It will be really helpful.
Kiran
As far i know u have to use keyword
Position Detail
u will find plenty videos on youtube about this keyword
Since it is long only i have used transaction type as buy
Raghu
So using this will take entry in the first stock of the Nifty50 list which satisfy the condition and subsequent entries will be blocked, am I right ? And how are the resulting stocks sorted - on price, volume etc?
Kiran
Yes after 1 entry the position detail entry wont be satisfied, so no more entries.
Entry first come first serve…whichever stock satisfies the condition first…
Tradetron TeamTradetron team
Yes. Gate the entry with a count of open instruments:
Open Positions Detail('All', 'All', |NIFTY50 LIST|, 'count') < Number(1)
(For a long-only strategy you can use 'Long' as the first argument.)
The first stock that meets the condition enters; the others are blocked while it is open. There is no sorting by price or volume: it is whichever stock satisfies the condition first.
If you want only one trade for the whole day (no new stock even after it exits), use a runtime counter instead: Initialize s1entry = Number(1), entry checks Get Runtime(s1entry) == Number(1), entry runtime sets it to Number(2).
If several stocks signal in the same check, more than one may enter. A smaller list is the only fix in that case.
Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.