How to judge the Stoploss or Takeprofit status of the history order?

 

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,

 
Anyone can help to answer this questions?
 

OrderComment() Gives you that indication

 
Answer in this thread -> https://www.mql5.com/en/forum/123668/.
 
gordon:
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.

Reason: