- How to check if an order is selected
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- ObjectGetDouble Check return value
Do you mean ResetLastError?
It is to "clear" the previously reported error, so that you can detect and respond to the next error going forward.
- docs.mql4.com
Check your return codes, and report your errors (including market prices and your variables). Don't look at GLE/LE unless you have an error. Don't just silence the compiler (MT5/MT4+strict), it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum (2012)
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles (2014)
Only those functions that return a value (e.g. iClose, MarketInfo, etc.) must you call ResetLastError before in order to check after.
Do you mean ResetLastError?
It is to "clear" the previously reported error, so that you can detect and respond to the next error going forward.
Thanks for the correction. I mean ResetLastError(). Thanks for the answer.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use