A pending order can't reach a take profit, and there is no deals associated. I suppose you mean a position resulting from the triggering of a pending order ?
Anyway, you can't do that from history only (takeprofit are not recorded on history). The easiest way is to detect a deal out, and compare the price with your take profit.
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
Hello community,
I am currently working on an EA using mql5 and I want to check if a pending order has reached its take profit.
I already thought of going through the list of HistoryDeals to identify the deal that corresponds with the pending order,
but this seemed a little too complicated for such a simple task.
I apologize for my english as I am from Germany.
Thanks in advance!
Chris