Sets the code that returns the terminal process when completing the operation.
[in] The code to be returned by the client terminal process when completing the operation.
No return value.
Setting the specified ret_code return code using the SetReturnError() function is useful for analyzing reasons of the programmatic operation completion when launching the terminal via the command line.
Unlike TerminalClose(), the SetReturnError() function does not complete the terminal operation. Instead, it only sets the code that returns the terminal process upon its completion.
If the SetReturnError() function is called multiple times and/or from different MQL5 programs, the terminal returns the last set return code.
The set code is returned upon the terminal process completion except for the following cases: