Hi, when I try to compile EA I get this error " Return value of 'OrderSend' needs to be checked". I am trying to create EA based on RSI of two currencies and based on that open trades..
How to resolve this error?
Regards.
IT is not an error, it is a warning.
You resolve it by checking the return value.
If it returns -1 then you know that there was an error, so you print the error (GetLastError())
I will move this to the MQL4 section.
How about doing what the warning says?
Check your return codes, and report your errors. Don't look at GLE/LE unless you have an error. Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum 2012.05.20
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles 25 March 2014
Hi, when I try to compile EA I get this error " Return value of 'OrderSend' needs to be checked". I am trying to create EA based on RSI of two currencies and based on that open trades..
How to resolve this error?
Regards.
int ticket=0; //----- ticket=OrderSend(...); if(ticket<0) { Print("OrderSend error (Direction buy or sell here) error : ",GetLastError()); return; }
Hi, thanx Kenneth. I want to send you source code of my EA. Please enable direct msg so that I can send you code. Regards.
Hi, thanx Kenneth. I want to send you source code of my EA. Please enable direct msg so that I can send you code. Regards.
why would i need you source code....? i gave you an example of how to code a correct return value for order send,implement it in your code because i'm not going to do it for you!
Need further help from some one interested in doing it? Post all relevant code right here in your thread
why would i need you source code....? i gave you an example of how to code a correct return value for order send,implement it in your code because i'm not going to do it for you!
Need further help from some one interested in doing it? Post all relevant code right here in your thread
No everything is perfect with the code now just as thanksgiving I want to give this code to you so that you can try it yourself.. Anyways take care
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, when I try to compile EA I get this error " Return value of 'OrderSend' needs to be checked". I am trying to create EA based on RSI of two currencies and based on that open trades..
How to resolve this error?
Regards.