An error that occurs while the program is running. In trading robots, examples include division by zero, invalid trade tickets, or array bounds violations. The MQL5 terminal reports runtime errors and sets _LastError
(e.g. “Array out of range”, “No error”, etc.). Runtime errors can halt execution or be handled. In C#, runtime errors throw exceptions (e.g. IndexOutOfRangeException
). These errors are usually found during testing or backtesting, and need debug inspection to locate the offending code.