I have been writing a strategy (on bar close) that keeps track of a number of variables (basically keeping track of pivot points). If the correct sequence does not appear, the strategy re-initialises the variables so it can start searching again. If the correct sequence does appear, it enters a position and then trails a stop using either SetTrailStop or ExitLongStop. However with either of these stop options, I don't know when these orders have been triggered an exit from my position so that the strategy can re-initialise the variables to start searching for the next trade. Can someone please let me know how I can detect this?
The only other way I have had this concept of reinitialising working in the past is to run the strategy on a tick-by-tick basis and then manually trigger ExitLong orders and reinitialise the variables at the same time. It is not my preference to have it running on a tick basis so if anyone could help, I would really appreciate it.
Regards,
Kylie.

Comment