Extract info about how an order was closed

 
I am looking for a way in MT4 to programatically know how an order was closed, e.g. did the EA close it or was it a human/manually instigated operation. Is this available? I've looked at all the Order* commands, nothing seem to fit this requirement.
 
jepper: I am looking for a way in MT4 to programatically know how an order was closed, e.g. did the EA close it or was it a human/manually instigated operation. Is this available? I've looked at all the Order* commands, nothing seem to fit this requirement.

It is not possible to determine if an order was manually closed or by an EA, or by the broker (stops or calls). All one can do is look at the logs in case the EA reports that operation specifically.

In case of broker, sometimes they update the Order Comment with a reason, for example "sl" or "tp".