But I have a problem if I want to cancel that long order and go short instead. If I try to just call EnterShortStopMarket, that order gets ignored (the entry rules in NT8 say this will happen). The only way I can send a reverse entry order is to first let the long be automatically canceled and then send the EnterShortStopMarket in the OnBarUpdate after that. In other words, it takes two bars to submit an opposite stop (or limit) or der - the first bar to let the long stop (or limit) get canceled, and then the second bar to actually submit the short.
So is it possible to submit an opposite order on the same bar using the managed approach? I have tried explicitly canceling the long order and then calling EnterShortStopMarket right after the call to CancelOrder but that does not work.
Is it possible to submit opposite orders in one bar using the managed approach, or is this only possible if we use the unmanaged approach? In the unmanaged approach, it appears I would have to add a 1 tick data series and submit the CancelOrder and opposite orders on the 1 tick data series so that my opposite order gets submitted after only a few ticks. Is this really the only option?
Comment