- 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
지정된 매개 변수를 사용하여 거래 계정에 연결합니다.
login(
|
Parameters
login
[in] 거래 계정 번호. 이름이 지정되지 않은 필수 매개 변수.
password
[in] 거래 계정 비밀번호 선택적 지명 파라미터. 비밀번호가 설정되어 있지 않으면 터미널 데이터베이스에 저장된 비밀번호가 자동으로 적용됩니다.
server
[in] 거래 서버명 선택적 지명 파라미터. 서버가 설정되지 않은 경우 마지막으로 사용한 서버가 자동으로 적용됩니다.
timeout=TIMEOUT
[in] 연결 시간 제한(밀리초). 선택적 지명 파라미터. 지정하지 않으면 값이 60000(60초)로 적용됩니다. 지정된 시간 내에 연결이 설정되지 않으면 통화가 강제로 종료되고 예외가 생성됩니다.
반환 값
거래 계정에 성공적으로 연결된 경우 True이며, 그렇지 않은 경우 False입니다.
예:
import MetaTrader5 as mt5
|
더 보기