Pending order ticket numbers

 
Let’s say for example i have a pending order placed on EURUSD from an expert advisor. The ticket number for this order is 12345. After x time, when the order is hit, does the ticket number be passed onto the opened trade with the same ticket number, or is a new ticket number assigned to the opened trade? Thanks
 
OisinKelly: Let’s say for example i have a pending order placed on EURUSD from an expert advisor. The ticket number for this order is 12345. After x time, when the order is hit, does the ticket number be passed onto the opened trade with the same ticket number, or is a new ticket number assigned to the opened trade? Thanks

Is this a MetaTrader 4 or a MetaTrader 5 question?

From your wording it seems you are probably talking about MetaTrader 4. If so, then yes the the Pending Order becomes a Market Order but keeps the same Ticket number.

If MetaTrader 5, then it is a little more complicated, because an Order will lead to Deals which in turn leads to a Position and all three levels have their own ticket numbers: Orders, Deals and Positions.

 
Fernando Carreiro:

Is this a MetaTrader 4 or a MetaTrader 5 question?

From your wording it seems you are probably talking about MetaTrader 4. If so, then yes the the Pending Order becomes a Market Order but keeps the same Ticket number.

If MetaTrader 5, it is a little more complicated, because an Order will lead to Deals which in turn leads to a Position and all three levels have their own ticket numbers: Orders, Deals and Positions.

Yes, it is a metatrader 4 question. Thanks for the answer !
 
  1. OisinKelly: Yes, it is a metatrader 4 question.

    Why did you post your MT4 question in the Moderators requested to manage this section. - Trading Systems - MQL5 programming forum instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum?
    Next time post in the correct place. The moderators will likely move this thread there soon.


  2. OisinKelly: does the ticket number be passed onto the opened trade with the same ticket number, or is a new ticket number assigned to the opened trade?

    It stays the same. Order type changes to buy/sell

Reason: