I have an unmanaged stock strategy.
When I use strategy analyzer to simulate the strategy all OK.
The problem is when I use playback on historical data.
I subit these orders:
SubmitOrderUnmanaged(0,OrderAction.SellShort, OrderType.Limit, quantity, limitPrice, 0, oco, "Example1");
SubmitOrderUnmanaged(0,OrderAction.BuyToCover, OrderType.StopMarket, quantity, 0, stopLossPrice, oco, "Example2");
SubmitOrderUnmanaged(0,OrderAction.BuyToCover, OrderType.Limit, quantity1, targetPrice1, 0, "Target1", "Example3");
SubmitOrderUnmanaged(0,OrderAction.BuyToCover, OrderType.Limit, quantity2, targetPrice2, 0, "Target2", "Example4");
The first two orders are executed correctly, the other two remain initialized orders.
Trying I realized that the problem is that OrderAction is the same for the last three orders (all BuyToCover)
Some solution?
Thanks Alberto
Comment