At one point yesterday, the strategy's position size increased from one bar to the next without (as far as I could tell) there being any IOrder object associated with the increase.
(The strategy uses entryOrder, targetOrder, stopOrder and flattenOrder IOrder objects. For debugging purposes, I record the values of these objects at the start and end of each OnBarUpdate, OnOrderUpdate, OnExecution, OnPositionUpdate, etc, and so can see that neither entryOrder, targetOrder, stopOrder nor flattenOrder changed values at the time Positions[0].Quantity increased by 1.)
At the time of the above increase in position size, the log shows the following entry...
Order='dabae2cc4516485197a998fc8f82a752/Sim101' Name='Syncing strategy position after flat' New state=PendingSubmit Instrument='YM 12-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
Order='dabae2cc4516485197a998fc8f82a752/Sim101' Name='Syncing strategy position after flat' New state=Accepted Instrument='YM 12-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
Order='dabae2cc4516485197a998fc8f82a752/Sim101' Name='Syncing strategy position after flat' New state=Working Instrument='YM 12-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
Order='dabae2cc4516485197a998fc8f82a752/Sim101' Name='Syncing strategy position after flat' New state=Filled Instrument='YM 12-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=1 Fill price=13290 Error=NoError Native error=''
Execution='5a8113405349489e98ed34088fa85534' Instrument='YM 12-12' Account='Sim101' Exchange=Default Price=13290 Quantity=1 Market position=Long Operation=Insert Order='dabae2cc4516485197a998fc8f82a752' Time='12/12/2012 12:41:12 PM'
Instrument='YM 12-12' Account='Sim101' Avg price=13284.5 Quantity=2 Market position=Long Operation=Update Currency=Unknown
Any ideas?

Comment