Download MetaTrader 5
To add comments, please log in or register
How to use MQL5.community messages editor? Find out in the article!
Михаил
5
Михаил 2016.02.13 11:50 

<Russian Content deleted>

 1. return value of 'OrderSend' should be checked 1.mq4 4 4

                           2.  function must return a value                         1.mq4 5 4

                           0 error(s), 2 warning(s), compile time: 967 msec


//--------------------------------------------------------------------
int start()                                  // Special function start()
  {                                          // Opening BUY
   OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-15*Point,Bid+15*Point);
   return; // Exit start()
  }
//--------------------------------------------------------------------


Keith Watford
Moderator
7887
Keith Watford 2016.02.13 12:25  
int start()                                  // Special function start()
  {                                          // Opening BUY
   OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-15*Point,Bid+15*Point);
   return(0); // Exit start()
  }

Next time, please post on the Russian language forum


OrderSend returns -1 if it is not successful, you should code to check the error if this happends

/
To add comments, please log in or register