i got two orders

To add comments, please log in or register
yalewang
614
yalewang  

my code is like this :

start()

{

.........

if(orderstotal()==0) ordersend(.......)

..............................................

return(0) ;

}

i got two orders . i want to know how long will the sever return the new accout statates after it changes .

Simon Gniadkowski
17271
Simon Gniadkowski  
Doesn't it depend on when the next tick arrives ?
yalewang
614
yalewang  
i think i may be because,when an order was opened,the sever have not react in time,then the next tick comes,and orderstotal is still zero .
William Roeder
22329
William Roeder  

YALEWANG:

start(){ .........

if(orderstotal()==0) ordersend(.......)

..............................................

return(0) ;

}

i got two orders . i want to know how long will the sever return the new accout statates after it changes .


  1. if(orderstotal()==0) means the EA is incompatible with ever other including itself and manual trading.
    int count=0;
        for(int iPos = OrdersTotal()-1; iPos >= 0; iPos--)
         if(OrderSelect(iPos, SELECT_BY_POS)                    // Only my orders w/
        )if(OrderMagicNumber()  == magic.number                 // my magic number
        )if(OrderSymbol()       == chart.symbol                 // and my pair.
        ){  count++; }
    if (count == 0) ...
    
  2. Everything has been update once OrderSend(), returns (except Bid/Ask)
To add comments, please log in or register