This thread will contain examples of different ways to use “Positions Detail” Keyword to restrict the number of entries in a strategy.
- It is used to limit the number of entries.
- It is applicable at “Strategy Level” and not at “Set” Level.
Let us take an example:
- you have two sets 1 Long and 1 short
- Each set has individual exits
- 1 Universal exit @ 3:15
- 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)
(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 onwards:
Entry B is set to 100
Entry S is set to -100
Please check the following videos and multiple examples and combinations in which the keyword can help you: