I make an EA for hectic market (specially nfp) long time ago. It was works just fine.
But then i need to change some of the variables. And after i compile it, i can't run it again.
I try to run another old EA, it works. Then i try to recompile it, it doesn't works.
The error i got is " 'ea_name' is not expert and cannot be executed " in my metatrader.
Then i browse the internet to find what is wrong with my EA, then i know that there is some change in mql code.
So i try to change my EA code, until i got no error. But the EA still doesn't work, and i still got the error " 'ea_name' is not expert and cannot be executed ".
What is wrong with my EA?
Below is my attached EA. The ea_old is my original EA, the ea_new is my editted EA.
Thanks,
-DinneBolt~~
#property show_inputsI can also suggest to use the search engine for such issue : https://www.mql4.com/search#!keyword=not%20expert%20and%20cannot%20be%20executed&module=mql4_module_forum
Hello, sorry for the late reply.
Thank you very much for your reply, my EA is work now. But i don't know why i still get the error "return value of 'OrderSelect' should be checked" and all OrderETC on my ea_old.mq4, is this ok?
No need to be sorry, it's a forum, not a chat
These are warnings. It could be ok, but it's a good practice to check the returned value of functions. See Common Errors in MQL4 Programs and How to Avoid Them
Hello, sorry for the late reply.
Thank you very much for your reply, my EA is work now. But i don't know why i still get the error "return value of 'OrderSelect' should be checked" and all OrderETC on my ea_old.mq4, is this ok?
Usually you can silence that warning by telling the program what to do if OrderSelect fails :
for(int cnt=OrdersTotal()-1;cnt>=0;cnt--) { if(OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)==false) //or if( !OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES) , same thing Print("Failed to select order, error : "+GetLastError()); // if it fails , print, if not , keep going
Hope it helps
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I make an EA for hectic market (specially nfp) long time ago. It was works just fine.
But then i need to change some of the variables. And after i compile it, i can't run it again.
I try to run another old EA, it works. Then i try to recompile it, it doesn't works.
The error i got is " 'ea_name' is not expert and cannot be executed " in my metatrader.
Then i browse the internet to find what is wrong with my EA, then i know that there is some change in mql code.
So i try to change my EA code, until i got no error. But the EA still doesn't work, and i still got the error " 'ea_name' is not expert and cannot be executed ".
What is wrong with my EA?
Below is my attached EA. The ea_old is my original EA, the ea_new is my editted EA.
Thanks,
-DinneBolt~~