Download MetaTrader 5

Why there are OnTrade() and OnTradeTransaction() event handler?

To add comments, please log in or register
Install apps from the library right in MetaTrader. It is easy!
nicolasxu
296
nicolasxu 2014.10.02 09:18 

Why there is a need for two trade event handlers?

 

I read the difference here: https://www.mql5.com/en/docs/runtime/event_fire#trade

But I stilll can't fully comprehend the difference, since:

1) They overlap each other on handling same events, e.g.:

    Trade: sending, modifying or removing of a pending order

    TradeTransaction: Sending a trade request from any MQL5 application...

 

Why there is a need for 2 handlers that handle the same events?  Any best practice for them? 

Documentation on MQL5: MQL5 programs / Client Terminal Events
Documentation on MQL5: MQL5 programs / Client Terminal Events
  • www.mql5.com
MQL5 programs / Client Terminal Events - Reference on algorithmic/automated trading language for MetaTrader 5
Stanislav Korotky
17931
Stanislav Korotky 2014.10.02 13:32  
They are similar. You may use any of them. There was a question on this earlier.
nicolasxu
296
nicolasxu 2014.10.03 03:30  
marketeer:
They are similar. You may use any of them. There was a question on this earlier.
It helps me great. Thank you!
To add comments, please log in or register