Does PositionsTotal() work across different EAs?

 
Hey people, I'm new to mql5 coding and I've been wondering, does PositionsTotal() detect all positions opened by all running EAs or just the positions opened by the EA it's running from? Thank you in advance :)
 
Aymane Maizi:
Hey people, I'm new to mql5 coding and I've been wondering, does PositionsTotal() detect all positions opened by all running EAs or just the positions opened by the EA it's running from? Thank you in advance :)
All open positions, EA’s or not. 
 
Zaky Hamdoun #:
All open positions, EA’s or not. 

Thank you for the answer Zaky.

 

Hello, I also have a question regarding the subject, for example, how can I determine the number of transactions open only in Nasdaq, the maximum in each instrument. I want 1 transaction to be open.

Auto-translation applied by moderator

 
@Ozgurozen #: Hello, I also have a question regarding the subject, for example, how can I determine the number of transactions open only in Nasdaq, the maximum in each instrument. I want 1 transaction to be open.

Auto-translation applied by moderator

On the English forum, please write in English. Either use the automatic translation tool, or post in one of the other language forums.
 
Ozgurozen #:Hello, I also have a question regarding the subject, for example, how can I determine the number of transactions open only in Nasdaq, the maximum in each instrument. I want 1 transaction to be open.

Loop through all open positions

if((m_position.Symbol()==m_symbol.Name())

// write a code to count all open positions on each instrument.
Improperly formatted code edited by moderator.
 
CodeFx #: Loop through all open positions
Improperly formatted code edited by moderator.

Please, always use the CODE button (Alt-S) when inserting code.

Code button in editor