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.
- How to know the last closed order info.
- How to close ALL open orders?
- How to find out if order was closed manually?
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".
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