OrderSelect, OrderClose and OrderModify warnings

 

Hi all,

I just downloaded the latest mql4 platform from my broker's website ,

after compiling my expert advisor , i got the warning that the return value should be checked for the following

OrderSelect

OrderClose

OrderModify


but i did not have this challenge from the old platform .

what do i do?

i have attached the code to this message.

somebody please assist.


            
Files:
olayemi.mq4  13 kb
 
jmorgan:

Hi all,

I just downloaded the latest mql4 platform from my broker's website ,

after compiling my expert advisor , i got the warning that the return value should be checked for the following

OrderSelect

OrderClose

OrderModify

...
https://www.mql5.com/en/forum/151608
 

thanks for your prompt reply, but i don't know how to fix it,


i'm just learning coding, and you can see that i was able to code this EA through the help of an automated software.

kindly assist. the whole code is attached to my request, you can modify and send it back .

thanks.

Files:
olayemi_1.mq4  13 kb
 

It is good you are learning coding but not good to use automated EA creators because you learn nothing about the code it creates for you.

If yu want to learn about error handling you can read these sections from the mql4 book

error handling function

trade function with error handling 

The book is a little out of date now, the coding examples need small modifications but the basic idea holds true. 

 
I still remember when I had to read the book section of mql4. Quite funny feeling when I think of it especially when you realized it can be solved real easy. Just not notice it a bit earlier. XD
 
Yes the book has the complete solution my first EA was based on the book model.
Reason: