Pending order "urgent help"

Back to topics list To post a new topic, please log in or register
avatar
2
Krieg 2016.05.03 18:41
 
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict

extern int starthour = 9; 

void OnStart()
  {
  if ( Hour() == starthour)
  {
ordersendbuy();

}
else
Alert(GetLastError());

  }

void ordersendbuy()
{
double ticket;
double price = (Open[0]-(1000*Point));
ticket = OrderSend(Symbol(),OP_BUYSTOP,0.01,price ,0,0,price +(50*Point));
}


can anyone help me to solve this error.

the above script give error 130 when we attach it to a chart.

Need help in urgent

avatar
Moderator
3427
GumRai 2016.05.03 19:14 #
 
The entry for a Buy Stop order must be higher than the current Ask
Back to topics list  

To add comments, please log in or register