Automated Trading Language Documentation
Returns the contents of the system variable _LastError.
Returns the value of the last error that occurred during the execution of an mql5 program.
After the function call, the contents of _LastError are not reset. To reset this variable, you need to call ResetLastError().