I trading MHI ( Hong Kong index mini future) using TWS from Interactive Brokers and NT automate strategy.
I code exit on close like this
protected override void Initialize()
{
CalculateOnBarClose = true;
ExitOnClose = true;
ExitOnCloseSeconds = 30;
EntriesPerDirection = 2;
EntryHandling = EntryHandling.AllEntries;
TraceOrders = traceSet;
}
Strategy exit on close properly but if restart strategy after market close exit order disappeare. When I open strategy before session it place stop and limit orders from last entry so I have to cancell this orders manually but in this case strategy is open but does not work (no any error messages just do not place any orders). To start strategy I have to reload strategy on open market again and this time exit on close order appear properly.
So to start strategy I have to load it before session than cancell stop and limit orders and reload after market open.
This problem concern only ExitOnClose if the last order is StopLoss or TargetLimit there are no problem.
What is possible reason of such problem and how to resolve it???
Rgds
Czarek.

Comment