|
Why no simultaneous trades not happening?
Could someone explain to me why my EA never executes simultaneous trades in different pairs. It can execute in all pairs but cannot do it simultaneously. Each time a trade opens in one pair, it stalls all potential trades with other pairs.
Here's the code that defines when to start the trade:
total=OrdersTotal(); // check the total active orders
for(count=0;count<total;count++) // if there are active totals then proceed
{
OrderSelect(count, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol() && (OrderMagicNumber()==MAGIC))
{
<code>: The code here is never reached if one order is open in a specific pair.
Thanks for your help in advance.
If you need the whole code, please let me know so I can send it to you by email.
|