My strategy (code is attached) submit a market order and then close it. And the strategy repeats these actions three times.
The value returned by the IOrder.getCommission method for the 3rd order differs from the values for the 1st and 2nd orders.
06:32:06 The 3rd order: Commission after position CLOSING: 0.07 -- WRONG
06:32:05 The 3rd order: Commission before position CLOSING: 0.07
06:32:04 The 3rd order: Commission after position OPENING: 0.07
06:32:03 The 2nd order: Commission after position CLOSING: 0.14
06:32:02 The 2nd order: Commission after position OPENING: 0.07
06:32:01 The 1st order: Commission after position CLOSING: 0.14
06:32:00 The 1st order: Commission after position OPENING: 0.07