I have one mmstop order being placed upon the execution of a single entry order.
my second order is located within the onbarupdate() method as well as the logic that determines when the order is placed.
I can enter the market fine, however if my exit located within onbarupdate() is triggered instead of the mmstop, the Iorder object will not reset even though i have logic placed within onexecution referencing the exit.
If the mmstop order executes the reset logic which is the same as the onbarupdate located exit - resets correctly and will allow orders to continue.
Problem: Without Both orders resetting to null, One initiated from onbarupdate and the other from onexecution i cannot reenter the market as my entry is contingent upon both exit iorder objects being null.
I tried to use onorderupdate to reset the order located within onbarupdate but its also not resetting.
Print statements show the exits cancelled and filled after the onbarupdate() exit is filled however there state never changes....Do i need to handle this from onbarupdate() instead of onexecution?
^Thanks for ideas.

Comment