Can someone point out to me the reason that I get a warning at line 46?
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?
