How to know a order is closed by stoploss or takeprofit?

 
Hello,ALL.
I have a question. How to know a order is closed by stoploss or takeprofit?
1, I order a ticket by:
Ordersend(Symbol( ),op_sell,lots,bid,3,sl,tp)

2,When the Current prize is equal tp or equal sl, the order will be closed by server system.

3, In this time, I want order a ticket right now , What can I do? How can I know when the order is closed?



  
 
you can see them in the history window

-> if they closed by tp you will see the green color
-> if they closed by sl you will see the pink color


or


it will show in the "comments" column as [tp] or [sl]
 

Select order by ticket and check its close time. If close time > 0 then order was closed. Compare s/l price and close price.

BTW server adds to order's comment [sl] postfix

 
stringo:

Select order by ticket and check its close time. If close time > 0 then order was closed. Compare s/l price and close price.

BTW server adds to order's comment [sl] postfix

Search the comment of the closed order for the strings : [sl] <-- close by stop loss! and [tp] <-- close by takeprofit!
 

it is the only way to select by ticket ?? thank you.