Hi there,

The headline describes where I'm looking for: I have an EA running on different currency pairs with individual MagicNumber. For example, I run it on 3 different currencies and have "total" as OrdersTotal defined (e.g. 6).

So, I get max. 6 total open running, "worst case": all 6 are from the same pair.

Current situation:

extern int orders = 6;

int total=OrdersTotal();

if(total<orders)

.... routine starts and works well.

Now I want to adjust to have MaxTrades per currency pair (e.g. 2) limited as well. So, I will have the total (6) and max. per pair (2).

What do I need to add?

(I asked the simillar question in a different thread where I got really since support but it was not solved and I change the requirements here - therefore the new thread - just in case someone would ask).

Thank you in advance.

The headline describes where I'm looking for: I have an EA running on different currency pairs with individual MagicNumber. For example, I run it on 3 different currencies and have "total" as OrdersTotal defined (e.g. 6).

So, I get max. 6 total open running, "worst case": all 6 are from the same pair.

Current situation:

extern int orders = 6;

int total=OrdersTotal();

if(total<orders)

.... routine starts and works well.

Now I want to adjust to have MaxTrades per currency pair (e.g. 2) limited as well. So, I will have the total (6) and max. per pair (2).

What do I need to add?

(I asked the simillar question in a different thread where I got really since support but it was not solved and I change the requirements here - therefore the new thread - just in case someone would ask).

Thank you in advance.