Why is that? The portfolio position has not changed. I would like the pending order to still be there, or at least be resubmitted.
I use the SetProfitTarget within the OnBarUpdate method. Is this the right place for it? Maybe there is a OnStrategyEnabled method or something I should put it in?
I know that when I enable "Submit historical working order" the pending orders come back. But what will happen to unfilled orders that open a position? I don't want orders that have expired already to be opened (at much different price than strategy intended).
I could set the BarsIndex in the EnterLong() method to 0 so that the order expires at the end of the bar, but that will force me to use a limit order because at market I could risk a worse fill.
Looking forward to hear best practises in this.

Comment