Anyone can help to answer this questions?
OrderComment() Gives you that indication
Answer in this thread -> https://www.mql5.com/en/forum/123668/.
sorry didn't c
Thank you gordon and qjol. :)
In fact there are 3 scenarios in the closed orders,
1. The price hit the TakeProfit value. (TP)
2. The price hit the StopLoss value. (SL)
3. After some time, the trader closed the order manually without hit TP/SL.
My question is: How to know the 3 different closed reasons for my historical orders? Thanks.
![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
Dear all,
I am using the MT4-ECN platform, when one opening order is hitted by stoploss/takeprofit price, the real closed price is not equal to the setted stoploss/takeprofit price due to the slippage.
In the mql APIs, anyone know which API can judge whether the history order is stoploss or takeprofit?
Thanks,
Aihua,