I have been working on my expert advisor and have tried to open a pending order. i keep on getting error 130 (invalid goals), so i set my goals to 0 and then added a little script that closes all orders manually. I still get error 130(invalid goals), is MQL4 trolling me?!
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I have been working on my expert advisor and have tried to open a pending order. i keep on getting error 130 (invalid goals), so i set my goals to 0 and then added a little script that closes all orders manually. I still get error 130(invalid goals), is MQL4 trolling me?!
case(OP_SELL):
{
PosSizeShort = -((OpenShorts * GLval - OpenLongs * GSval - AmntPROFIT)/GLval)+1;
int Ticket = OrderSend(Symbol(), OP_BUYSTOP, (double)PosSizeLong, Price, 5, 0, 0);
if(Ticket < 0){Alert("order failes error #", GetLastError());}
else{Alert("Order placed succesfully");}
}
btw i have opened an order before with the goals that use to have on this one and that order executes perfectly like it's supposed to.