Download MetaTrader 5
To add comments, please log in or register
Find out how to add a video in the messages editor
Arturo Lopez Perez
160528
Arturo Lopez Perez 2013.12.03 07:58 

Good morning,

I am having a hard time iterating deals from an EA. I would like to get only those deals which are currently open (several symbols, not related to one position).

Is there an easy way to do so? Iterating all deals does not seem efficient. Thanks in advance!

Alain Verleyen
Moderator
30282
Alain Verleyen 2013.12.03 08:15  
PzTrading:

Good morning,

I am having a hard time iterating deals from an EA. I would like to get only those deals which are currently open (several symbols, not related to one position).

Is there an easy way to do so? Iterating all deals does not seem efficient. Thanks in advance!

A deal can be IN or OUT (eventually IN/OUT). A deal can't be "open" or "close", only a position can. So what are you trying to do exactly ?
Dua Yong Rew
5395
Dua Yong Rew 2013.12.03 08:44  
PzTrading:

Good morning,

I am having a hard time iterating deals from an EA. I would like to get only those deals which are currently open (several symbols, not related to one position).

Is there an easy way to do so? Iterating all deals does not seem efficient. Thanks in advance!

HistoryDealGetInteger(Ticket, DEAL_ENTRY); > those that are sent
PositionGetInteger(POSITION_VOLUME); > currently opened
Arturo Lopez Perez
160528
Arturo Lopez Perez 2013.12.03 17:00  
doshur:
Thanks!
/
To add comments, please log in or register