When you have a strategy with the following settings:
CalculateOnBarClose = false;
RealtimeErrorHandling = RealtimeErrorHandling.TakeNoAction;
Unamanaged = true;
IgnoreOverFill = true;
and you are in a simulated historical position just right after you enable the strategy (and live data is streaming in), you can't exit the position instantly (you have to wait until the bar close).
For example, you start the strategy, you're in a LONG position (from a previous SubmitOrder call). The strategy is still reporting your in Historical mode, and the LONG position is simulated.
If you try to exit this simulated position using a SubmitOrder. with an OrderType of OrderType.Sell, it will force you to wait until the close of the current bar even if it's a market order.
This is problematic for me because the strategy is designed to not place new orders on until it knows the previous position is actually closed.
Jeremy

Comment