I am testing my Strategy, it is working well but output windows is showing many ignored exit orders because currently I just issue exit routine for all entries that has selected the particular exit signal. Obviously some of the entries did not have a position or some targets have been reached. All my entries are given the stringID. I would like to avoid having such Ignored order. Lets say, max position is 6, lets have this scenarios, the strategy has issued:
EnterLong(1, "En1Qty1");
EnterLong(1. "En1Qty2");
EnterLong(1, "En2Qty1);
EnterLong(1, "En2Qty2);
EnterLong(1, "En3Qty1");
EnterLong(1, "En3Qty2");
Exit Long Signal 2 is detected, Position is currently 4 Longs. And Entries 1 & 3 has been set up to exit with Signal 2. I want to avoid doing catch all like:
ExitLong("Exit2","En1Qty1");
ExitLong("Exit2","En1Qty2");
ExitLong("Exit2","En3Qty1");
ExitLong("Exit2","En3Qty2");
How do I know which Entries 1 & 3 still has positions ?
How does one go about tracking/identifying positions ?
Thanks.
Regards,
EdwardK.

Comment