Does an OrderTicket ever change? (ECN platform)

 

I'm not sure if it's my EA coding that is at fault or if there is something else I need to be aware of...

In my EA, I open an order and save the OrderTicket number into a variable.
I use this OrderTicket to display the OrderProfit and monitor progress.


When I close the order and try to select the closed order using OrderSelect(MyOrderNo, SELECT_BY_TICKET); I get error 4105 (invalid ticket).

In the order history the closed order is displayed with the order number being something like: "#1564378, id12345 (which is my magic number), part from #1564104"

The "part from #1564104" was the original order ticket number. The order was completely (not partially) closed.

Does anyone know how I can reference my original order ticket when the order is closed?

Is it normal that a closed order has a different order ticket?

 

here.


OrderSelect(MyOrderNo, SELECT_BY_TICKET, MODE_HISTORY);

 
I've read that with some brokers the ticket number might change under certain situations (although this has never happened to me with Alpari UK). But even when it changes the magic number is supposed to be copied to the new ticket (or so I have read), so u can use that instead of ticket number.
 
gordon wrote >>
I've read that with some brokers the ticket number might change under certain situations (although this has never happened to me with Alpari UK). But even when it changes the magic number is supposed to be copied to the new ticket (or so I have read), so u can use that instead of ticket number.

From my experience and my broker i can tell you, that the magic number was always copied and correct,

the ticket number change in some cases like a partial close of an order.

 
maybe identical orders with low volume from different clients are combined to a new ticket to place them on the global market.
 
btw, is there some way to merge your own orders? I know this can be done easily in DukasCopy's platform... But I have never found a way to do that in MT4...?
Reason: