Download MetaTrader 5
To add comments, please log in or register
Unable to find the answer to your question? Use the search!
cxan_96 2015.06.16 16:47 

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!


Alain Verleyen
Alain Verleyen 2015.06.16 20:21  

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.

To add comments, please log in or register