The order was closed by SL, TP or manually.

 
What is the code for MQL4 to know if the order was closed by SL, TP or manually? I am reviewing the documentation but I cannot find how to do it. I hope you can help me.
 
  1. Some brokers modify comment with “[SL]” and “[TP]”. Others do not. Unreliable.
  2. You can check if the OrderClosePrice is closer to the SL or TP. But that won't work for manual closes.
  3. There is no such code.
Reason: