Why no simultaneous trades not happening?
Hi,
why do you have: if(OrderType()<=OP_SELL.....
??
this should be
if(OrderType()==OP_SELL.....
Hi,
why do you have: if(OrderType()<=OP_SELL.....
??
this should be
if(OrderType()==OP_SELL.....This means that only OP_BUY and OP_SELL are concerned, not the pendings.
Server communication
I think the order takes a while to reach the brokers server and be verified there. This is only a guess. One ea I had was made to trade at exactly 12H00 - but could only do so on 2 currencies simultaneously else it got a 'dispatch busy' kind of error.
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))
{
: 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.