xuzhe: I want a function occurs only when stoplose and takeprofit was trigged,Do i need OnTrade() event or OnTradeTransaction() Event()?
You can use any of the above Event.

Documentation on MQL5: Language Basics / Functions / Event Handling Functions
- www.mql5.com
Language Basics / Functions / Event Handling Functions - Documentation on MQL5
xuzhe:
i want to deal something when position touched stoplose and takeprofit?
I want a function occurs only when stoplose and takeprofit was trigged,Do i need OnTrade() event or OnTradeTransaction() Event()?
Thx a lot
As an example, see this topic Detect stop trigger in OnTradeTransaction backtest

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
i want to deal something when position touched stoplose and takeprofit?
I want a function occurs only when stoplose and takeprofit was trigged,Do i need OnTrade() event or OnTradeTransaction() Event()?
Thx a lot