NinjaTrader_Jim,
Thank you for posting your modified SampleOnOrderUpdate for partial fills (attached) (https://ninjatrader.com/support/foru...58#post1087458).
I believe I've wrapped my head around your logic. Though, should you have time, more in-code comments would be appreciated.
Differencing your modified code with the original SampleOnOrderUpdate shows in OnBarUpdate() the addition of "if (State == State.Historical) return;" and "Position.MarketPosition == MarketPosition.Flat".
Please explain your logic in adding "Position.MarketPosition == MarketPosition.Flat".
Again, thank you for posting the code.
Regards
Shannon
Comment