Download MetaTrader 5
To add comments, please log in or register
Read the Forum and improve your rating!
damms005
8
damms005 2014.05.16 01:49 
The error reported by GetLastError() How can I get the line where the error is?
Rogerio Figurelli
Moderator
39469
Rogerio Figurelli 2014.05.16 02:28  
damms005:
The error reported by GetLastError() How can I get the line where the error is?

Hi damms005, you don't have this information ready, anyway you can manage using ResetLastError() before a code or function you suspect, to isolate the error.

Documentation on MQL5: Common Functions / ResetLastError
Documentation on MQL5: Common Functions / ResetLastError
  • www.mql5.com
Common Functions / ResetLastError - Reference on algorithmic/automated trading language for MetaTrader 5
Rodrigo Malacarne
Moderator
9889
Rodrigo Malacarne 2014.05.16 02:57  
damms005:
The error reported by GetLastError() How can I get the line where the error is?

If you mean the error description, then please take a look at this link.

However, if you want to find where, inside your code, any error occurs, then it would be interesting to use a Print function together with some description and the GetLastError function. Something like:

Print("Error while sending the order. Error# = ",GetLastError());
/
To add comments, please log in or register