- initialize
- login
- shutdown
- version
- last_error
- account_info
- terminal_info
- symbols_total
- symbols_get
- symbol_info
- symbol_info_tick
- symbol_select
- market_book_add
- market_book_get
- market_book_release
- copy_rates_from
- copy_rates_from_pos
- copy_rates_range
- copy_ticks_from
- copy_ticks_range
- orders_total
- orders_get
- order_calc_margin
- order_calc_profit
- order_check
- order_send
- positions_total
- positions_get
- history_orders_total
- history_orders_get
- history_deals_total
- history_deals_get
login
Connect to a trading account using specified parameters.
login(
|
Parameters
login
[in] Trading account number. Required unnamed parameter.
password
[in] Trading account password. Optional named parameter. If the password is not set, the password saved in the terminal database is applied automatically.
server
[in] Trade server name. Optional named parameter. If no server is set, the last used server is applied automatically.
timeout=TIMEOUT
[in] Connection timeout in milliseconds. Optional named parameter. If not specified, the value of 60 000 (60 seconds) is applied. If the connection is not established within the specified time, the call is forcibly terminated and the exception is generated.
Return Value
True in case of a successful connection to the trade account, otherwise – False.
Example:
import MetaTrader5 as mt5
|
See also