As I've been reading through the help, I believe I've come across conflicting descriptions of the life cycle/duration of managed orders. On the one hand, I believe I've read that if a managed order is not filled on the bar on which it was entered, it is canceled. HOwever, I also read the below, which indicates that an order lives as long as it is constantly refreshed in every call to OnBarUpdate()
Let's say you're using Renko bars and at the first tick of a bar, you enter a stop order above where you know it's high is going to be if the bar closes up. You only want a fill on the current bar, not a subsequent bar. The order would be based on:
EnterLongStopMarket(<my stop price>)
The order will or won't be filled depending on where price goes during the current bar. Do I enter the order once, knowing it will be canceled if a new bar forms and the order is still open, or, do I reenter the order on every call with every tick to OnBarUpdate(), per the above? If I reenter the order on every call to OnBarUpdate(), then I assume I have to track whether or not I'm still on the bar on which I want to order to be filled or to be canceled. It's a bit confusing. If someone from the Ninja team could please clarify exactly how the lifecycle of a managed order works, and what the strategy developer has to do to properly work with that, I would appreciate it.
Regards,
Gordon
Comment