[Deals] How to get only opened deals?

 

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!

 
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 ?
 
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
 
doshur:
Thanks!