The function commands the terminal to complete operation.
[in] Return code, returned by the process of the client terminal at the operation completion.
The function returns true on success, otherwise - false.
The TerminalClose() function does not stop the terminal immediately, it just commands the terminal to complete its operation.
The code of an Expert Advisor that called TerminalClose() must have all arrangements for the immediate completion (e.g. all previously opened files must be closed in the normal mode). Call of this function must be followed by the return operator.
The ret_code parameter allows indicating the necessary return code for analyzing reasons of the program termination of the terminal operation when starting it from the command prompt.