I have an NT8 strategy that is intended to enter short a position and enter a stop market (buy to close) at the same time, then I enter a target close (limit order) manually after hours. On first trial, the strategy re-entered the position immediately upon hitting a stop, which could have caused an endless vicious cycle if I wasn't watching (it was painful enough watching the 1 minute loss I suffered after re-entry).
My first solution was to disable the strategy immediately after the stop order to prevent re-entry from occurring, but it seems this disable command prevents the prior commands from being executed, at least during my over-the-weekend tests that I ran, which I performed with and without the termination command. Is there something I need to do to allow prior commands to execute first before terminating the strategy? I unchecked both entry and exit "Cancel orders when a strategy is disabled" under Tools>>Options>>Strategies, set EntriesPerDirection = 1, and set EntryHandling = AllEntries. Thanks
if (Condition == true) //entry condition is true { EnterShort(NumShares); ExitShortStopMarket(NumShares, EntryPrice*1.1); SetState(State.Terminated); }
Comment