MQL5 ReferenceCheckupGetLastError 


Returns the contents of the system variable _LastError.

int  GetLastError();

Return Value

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().

See also

Trade Server Return Codes