MT5WaitForTerminal {MetaTrader}R Documentation

Wait for the MetaTrader 5 Terminal to connect to a broker's server

Description

Waits for the MetaTrader 5 Terminal to connect to a broker's server.

Usage

  MT5WaitForTerminal()

Details

Maximum waiting time is 1 minute. To check the current connection status, use MT5TerminalInfo.

Value

Returns TRUE if connection is established successfully, FALSE if the waiting time is exceeded.

Examples

  # start MetaTrader 5 Terminal (you should have it installed), call on first request only
  MT5Initialize()
  # wait for connection with broker server, call on first request only
  MT5WaitForTerminal()

[Package MetaTrader version 5.0.0 Index]