I am working in a kind of more CPU consuming strategy with CalculateOnBarClose = false; and I am getting very weird results when running in real time data (Simulated Account).
Code sends commands to cancels all open or pending orders when (position.MarketPosition == MarketPosition.Flat) but in the real time data the position is growing like 5 and 10 and 30... until it crashes for limit or order management reasons.
Running in market replay data works with no bugs.
Please give me some light!
Thanks
Comment