Read this article https://www.mql5.com/en/articles/1111
![MQL5 Cookbook: Processing of the TradeTransaction Event MQL5 Cookbook: Processing of the TradeTransaction Event](https://c.mql5.com/36/5/mql5-cookbook-processing-of-the.png)
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.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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!