How to use Positions Details in multiple sets — Tradetron Community
← Community

How to use Positions Details in multiple sets

Keyword help 1,268 views

Shivanshu

Suppose we have 6 set , Each set have 1time exit, all the set have only two leg one is sell side call and other is put side short.
Now how to use Positions Detail keyword to avoid reentry in each set?
Please Help.

Tradetron Team Tradetron team

Positions Detail is strategy-wide and counts closed trades too, so it cannot tell one set from another. Use a runtime-variable guard per set:

  1. Initialize s1 = Number(1), s2 = Number(1) … s6 = Number(1).
  2. Set N entry: Get Runtime(sN) == Number(1) AND your logic.
  3. In Set N entry runtime: sN = Number(2).

Start at 1, not 0. A Universal Exit resets all of them. 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.