Hi, sorry I also having OrderSend error 130
Hopefully someone can help
Below is my code
void oo(string ord)
{
int error;
int limit = 2500;
int stop = 500;
int lot = 1;
int slip = 5;
string ea_comment = "";
if (ord=="Buy" )
{
ea_comment=ea_name+" Buy Order Number: "+order_count;
error=OrderSend(Symbol(),OP_BUY,lot,Bid,slip,NormalizeDouble(Ask-stop*Point,5),NormalizeDouble(Ask+limit*Point,5),ea_comment,1011);
}
else if (ord=="Sell")
{
ea_comment=ea_name+" Sell Order Number: "+order_count;
error=OrderSend(Symbol(),OP_SELL,lot,Ask,slip,NormalizeDouble(Bid+stop*Point,5),NormalizeDouble(Bid-limit*Point,5),ea_comment,1021);
}
if (error==-1) //operation failed
{
ShowERROR(error,0,0);
}
return;
}