LOGIN

Join & EARN

FOREX ALGOS { }

What We Do

BlackBox

Backtest Results How It Works Full Refund Promise Supported Brokers Income Targets

Robots Glossary

GetLastError (MQL)

GetLastError - A function (and variable _LastError) that returns the last runtime error code in an MQL program. After any MQL call that may fail (e.g. trade functions), check GetLastError() to see if an error occurred and what code was returned. This helps catch issues like trade execution failures or invalid parameters.