I have come across an occasionally recurring problem in OnExecutionUpdate, where it seems to get stuck with a position of 1 contract when I dont' have any position. Then further executions are off, with the Position being reported incorrectly, and IsEntry being triggered when it's actually an exit, etc..
Perhaps I don't understand what it's doing, but the behavior isn't consistent and doesn't make sense to me. Normally it behaves as expected. But when this happens, the only remedy I have found is to reset the Database.
Please see the attached image of output from OnExecutionUpdate for an example.I've commented on it as I thought necessary.
Comment