Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639
|
PTJDAX,
you can look into the reserved word "total". This is the explanation from the manual:
Total
Used in strategy exit statements, following a numerical expression and the words Shares or Contracts, to indicate that only the number of contracts or shares specified by the numerical expression is to be sold or covered in total, regardless of the number of open entries. The contracts or shares will be sold or covered in the same order they were bought or shorted: First In, First Out.
If the word Total is not used, the number of contracts or shares specified by the numerical expression will be sold or covered for each one of the open entries.
If this doesn't give you the desired result you will have to tie the exit orders to specific entry orders. For example you can dynamically change the entry name for each order, so each entry is unique. You can for example add the number of contracts at the time of the entry (converted to a string).
This will also ensure that an exit is not re-used.
Regards,
ABCTG
|