OrderSend from the documentation
Returned value
Returns number of the ticket assigned to the order by the trade server or -1 if it fails. To get additional error information, one has to call the GetLastError() function.
int ticket=OrderSend(Symbol(),OP_BUY,1,price,3,stoploss,takeprofit,"My order",16384,0,clrGreen); if(ticket<0) { Print("OrderSend failed with error #",GetLastError()); } else Print("OrderSend placed successfully");
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
Can anyone help me with this code as the warning is coming up as "Returned value of 'OrderSend' should be checked,