You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.