Download MetaTrader 5

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

To add comments, please log in or register
nicolasxu
304
nicolasxu  

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
20324
Stanislav Korotky  
They are similar. You may use any of them. There was a question on this earlier.
nicolasxu
304
nicolasxu  
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