I have seen weird case when using limit-orders which are only active for the current bar.
When trading in markets which are very slow and doesn't produce many ticks per minute (e.g. overnight 6E germany time) then I use the following order:
targetOrder = ExitShortLimit (0, false, quantity, targetLevel, "Profit-Target", entryOrder.Name);
Now I'm working on M1-Timeframe and sometimes after midnight I see in my log that the limit order is cancelled ... after testing with the replay connection I can reproduce the following ...
00:26 - Orders placed, all seems to be ok.
00:27 - Orders placed again, because I need to set it for everey bar
00:28 - ...
00:29 - ...
00:30 - Order: Type = Limit State = Cancelled
There is no new bar on 00:30 because there are limited ticks in the market, so the next bar opens at 00:30 plus 10 seconds, and right before the 10 seconds the Limit-Order is cancelled.
So I need some confirmation about this. Is my assumption correct that in a slow market the orders are cancelled on a new bar, when there are no new ticks for the new bar ... after 10 seconds of inactivity?
So for this case I need to use always "liveUntilCancelled" configuration of orders?
Thx,
DT
Comment