I have seen a fair few threads with issues/bugs around cancelling orders. I have a strategy, within the strategy I maintain a list of orders - I add to it when a limit order is placed and remove from it when it is filled - so it is a list of open orders. Yestersday I made a call to my function that loops through my list of orders in order to cancel them all - in doing so it cancelled the entire position and the unfilled orders! ... Is that something anybody has run across before ... I hope it is a bug in my code but how can a call to CancelOrder actually close a position - if a call to CancelOrder is made with an IOrder that has been filled does it close the position???
Many Thanks
Paul

Comment