This is how I check what order is being called. I came across issues where sometimes execution.Order == Order object checks didn't work so I make sure by the name as well. In this case, we are saying if we have an order executed that is NEITHER enter long nor enter short then do whatever we need to do which in this case is get exit time because we assume that if it's not either of the entry orders then the fill must be one of the exit orders getting filled.