How to use position detail keyword?

Can anyone please share how position detail keyword is used. Can’t find much about it.

Let us take an example:

  1. you have two sets 1 Long and 1 short
  2. Each set has individual exits
  3. 1 Universal exit @ 3:15
  4. Position detail is set to (Entry, All, Any, Quantity,underlying) == 0

now let us say your entry condition x satisfies and since no open positions during the start of the day as it is the first trade the position is equal to zero
The system triggers the order of 100 qty trade. and makes a note that Entry = 100

now a counter signal is generated, however, when it checks if the Entry quantity == 0 is turns false and the counter trade is not triggered.
now again new long signal is generated, it checks for Entry qty == 0, it turns false and no trade is triggered

the same is true if a Short signal is generated first.

once the first trade is taken, the Entry qty is set to 100 and this condition will restrict new orders.

Now let us assume that you have set the Position detail to
(Entry, b, Any, Quantity,underlying) == 0 in the Long Set(Set 1)
and
(Entry, S, Any, Quantity,underlying) == 0 in the Short set(Set 2)

now again assume that a long signal is generated, since this is the first trade, the current positions in the strategy is zero
The system fires an order for 100 qty.
This time however, instead of mapping 100 to Entry, 100 qty is mapped to only Buy side Entry
now when the exit happens, and a counter signal is generated. The sell side position is still zero
hence it will take a short trade.
From here onward,
Entry b is set to 100
Entry S is set to -100

and it will not let any further trades

1 Like

In my case I have 2 sets and I want each set take entry independently. Here how do i check if current set has open position or not?