- 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
last_error
마지막 오류에 대한 데이터를 반환합니다.
last_error() |
반환 값
마지막 오류 코드와 설명을 튜플로 반환합니다.
참고
last_error()를 사용하면 MetaTrader 5 라이브러리 기능의 실행에 실패한 경우 오류 코드를 얻을 수 있습니다. 이것은 GetLastError()와 유사합니다. 그러나 자체 오류 코드가 적용됩니다. 가능한 값:
Constant |
Value |
Description |
---|---|---|
RES_S_OK |
1 |
대체로 성공 |
RES_E_FAIL |
-1 |
대체로 실패 |
RES_E_INVALID_PARAMS |
-2 |
잘못된 인수/매개 변수 |
RES_E_NO_MEMORY |
-3 |
no memory condition |
RES_E_NOT_FOUND |
-4 |
내역 없음 |
RES_E_INVALID_VERSION |
-5 |
잘못된 버전 |
RES_E_AUTH_FAILED |
-6 |
인증 실패 |
RES_E_UNSUPPORTED |
-7 |
지원되지 않는 방법 |
RES_E_AUTO_TRADING_DISABLED |
-8 |
자동거래 비활성화 |
RES_E_INTERNAL_FAIL |
-10000 |
내부 IPC 일반 오류 |
RES_E_INTERNAL_FAIL_SEND |
-10001 |
내부 IPC 전송 실패 |
RES_E_INTERNAL_FAIL_RECEIVE |
-10002 |
내부 IPC recv 실패 |
RES_E_INTERNAL_FAIL_INIT |
-10003 |
내부 IPC 초기화 실패 |
RES_E_INTERNAL_FAIL_CONNECT |
-10003 |
내부 IPC no ipc |
RES_E_INTERNAL_FAIL_TIMEOUT |
-10005 |
내부 시간초과 |
예:
import MetaTrader5 as mt5
|
더 보기