
You don't mention what warning you get.
Probably that the return from OrderSend should be checked.
Check that it returns >0 else print the error.
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
In future, please do not show screenshots of code.
Copy and paste code using the code button </> (Alt+S).
Keith Watford:
In future, please do not show screenshots of code.
Copy and paste code using the code button </> (Alt+S).
I am sorry, noted
int ticket=0; //--- ticket=OrderSend(...);
Kenneth Parling:
Yes the warning has disappeared, but would you help me understand why I should assign the OrderSend function to an int variable so I wont get this warning? as I did not get the same warning for OrdersTotal() and I want to know the difference between OrderSend () and OrdersTotal() for instance, as why OrderSend() should be assigned to int variable while OrdersTotal () worked fine without assign it to any kind of variables?

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