Download MetaTrader 5

OrderSend error 130

To add comments, please log in or register
Lorenzo Bagattini
16
Lorenzo Bagattini  
Hi, I made my first EA but I don't understand why it doesn't work. The Strategy Tester give the answer OrderSend error 130 and I don't know what do to correct the code. Please, can you help me?
Files:
esempio3.mq4 1 kb
Keith Watford
Moderator
10614
Keith Watford  
void start()
  {
   double Average=Average();
   if(Ask<Average)
    {
     OrderSend(Symbol(),OP_BUY,1,Ask,30,Ask+400*Point,Ask+400*Point);
    }
   return;
  }

double Average()
  {
   double a = (Close[0]+Close[1]+Close[2]+Close[3]+Close[4])/5;
   return (a);
  }
Your SL and TP are both the same. For a buy order the SL would need to be Ask-400*Point
Lorenzo Bagattini
16
Lorenzo Bagattini  
GumRai:
Your SL and TP are both the same. For a buy order the SL would need to be Ask-400*Point
Lorenzo Bagattini
16
Lorenzo Bagattini  
Lorenzo171298:Thank you very much GumRai


To add comments, please log in or register