Getting errors but don't know where to correct, please help!

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
250
ffoorr 2015.01.22 13:06 #
 

This part will be an endless loop, no ?

while(true)                                  // Cycle that opens an order    
{     
int ticket1=OrderSend(Symbol(), OP_BUY, Lot, Ask, 2, SL, TP);
int ticket2=OrderSend(Symbol(), OP_SELL, Lot, Bid, 2, SL, TP);    
Alert (GetLastError()); 
Alert(Symbol(),"  Sell = ",AccountFreeMargin()// At selling       
  -AccountFreeMarginCheck(Symbol(),OP_SELL,1)); 
   Alert(Symbol(),"  Buy = ",AccountFreeMargin() // At buying       
  -AccountFreeMarginCheck(Symbol(),OP_BUY,1));  
  return(true);
  }
avatar
Moderator
3418
GumRai 2015.01.22 13:45 #
 
ffoorr:

This part will be an endless loop, no ?

I don't think so.

there are no conditions for the return so all code after the return will not be executed 

Back to topics list   | 1 2  

To add comments, please log in or register