How to identify a specific request when I take the event OnTradeTransaction?

 

Helo everyone,

 I hope everyone are fine.

 Let's suppose I sent a ten requests few seconds ago to the market for the same symbol. Then, right now I receive an event in the function OnTradeTransaction(trans, request, result).

 In this moment I don't know what request (order) cause the event OnTradeTransaction.

 How can I map this information? I tried to use the request.order in my demo account, but every time I receive an event the request.order or trans.order are 0. In this context, I can't map them. 

Can you help me?

 Tks a lot! 

 
Read this article https://www.mql5.com/en/articles/1111
MQL5 Cookbook: Processing of the TradeTransaction Event
MQL5 Cookbook: Processing of the TradeTransaction Event
  • 2014.10.09
  • Dennis Kirichenko
  • www.mql5.com
This article considers capabilities of the MQL5 language from the point of view of the event-driven programming. The greatest advantage of this approach is that the program can receive information about phased implementation of a trade operation. The article also contains an example of receiving and processing information about ongoing trade operation using the TradeTransaction event handler. In my opinion, such an approach can be used for copying deals from one terminal to another.