YI GOLD

MT4 / MT5 Error Codes & Trading Tools

Search official trade, runtime and compilation codes and warnings. Calculate risk using actual contract specifications.

Position & Risk

Size exposure using equity, stop distance and actual specifications.

Open calculator
Advanced contract parameters

Margin & Value

Estimate margin, tick value and price-move value.

Open calculator
Advanced contract parameters

Compound & Drawdown

A mathematical scenario, not a forecast of strategy returns.

Open calculator

Calculations run locally in your browser. Inputs are not uploaded or saved. Terminal and broker margin rules apply; estimates exclude slippage, commission and swap.

Official error code lookup

1171 matching records

Platform / categoryCode / constantOfficial meaningTroubleshooting
MT4 · Runtime errors5006 ERR_FILE_CANNOT_DELETECannot delete file
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5007 ERR_FILE_INVALID_HANDLEInvalid file handle (file closed or was not opened)
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5008 ERR_FILE_WRONG_HANDLEWrong file handle (handle index is out of handle table)
YI GOLD suggestions

Check length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access.

MetaQuotes
MT4 · Runtime errors5009 ERR_FILE_NOT_TOWRITEFile must be opened with FILE_WRITE flag
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5010 ERR_FILE_NOT_TOREADFile must be opened with FILE_READ flag
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5011 ERR_FILE_NOT_BINFile must be opened with FILE_BIN flag
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5012 ERR_FILE_NOT_TXTFile must be opened with FILE_TXT flag
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5013 ERR_FILE_NOT_TXTORCSVFile must be opened with FILE_TXT or FILE_CSV flag
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5014 ERR_FILE_NOT_CSVFile must be opened with FILE_CSV flag
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5015 ERR_FILE_READ_ERRORFile read error
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5016 ERR_FILE_WRITE_ERRORFile write error
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5017 ERR_FILE_BIN_STRINGSIZEString size must be specified for binary file
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5018 ERR_FILE_INCOMPATIBLEIncompatible file (for string arrays-TXT, for others-BIN)
YI GOLD suggestions

Check length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access.

MetaQuotes
MT4 · Runtime errors5019 ERR_FILE_IS_DIRECTORYFile is directory not file
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5020 ERR_FILE_NOT_EXISTFile does not exist
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5021 ERR_FILE_CANNOT_REWRITEFile cannot be rewritten
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5022 ERR_FILE_WRONG_DIRECTORYNAMEWrong directory name
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5023 ERR_FILE_DIRECTORY_NOT_EXISTDirectory does not exist
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5024 ERR_FILE_NOT_DIRECTORYSpecified file is not directory
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5025 ERR_FILE_CANNOT_DELETE_DIRECTORYCannot delete directory
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5026 ERR_FILE_CANNOT_CLEAN_DIRECTORYCannot clean directory
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5027 ERR_FILE_ARRAYRESIZE_ERRORArray resize error
YI GOLD suggestions

Check length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access.

MetaQuotes
MT4 · Runtime errors5028 ERR_FILE_STRINGRESIZE_ERRORString resize error
YI GOLD suggestions

Check permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access.

MetaQuotes
MT4 · Runtime errors5029 ERR_FILE_STRUCT_WITH_OBJECTSStructure contains strings or dynamic arrays
YI GOLD suggestions

Check length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access.

MetaQuotes
MT4 · Runtime errors5200 ERR_WEBREQUEST_INVALID_ADDRESSInvalid URL
YI GOLD suggestions

Inspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description.

MetaQuotes
MT4 · Runtime errors5201 ERR_WEBREQUEST_CONNECT_FAILEDFailed to connect to specified URL
YI GOLD suggestions

Inspect connectivity, logs and request time. Verify actual order status before bounded retries with backoff to avoid duplicate exposure after a timeout.

MetaQuotes
MT4 · Runtime errors5202 ERR_WEBREQUEST_TIMEOUTTimeout exceeded
YI GOLD suggestions

Inspect connectivity, logs and request time. Verify actual order status before bounded retries with backoff to avoid duplicate exposure after a timeout.

MetaQuotes
MT4 · Runtime errors5203 ERR_WEBREQUEST_REQUEST_FAILEDHTTP request failed
YI GOLD suggestions

Inspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description.

MetaQuotes
MT4 · Runtime errors65536 ERR_USER_ERROR_FIRSTUser defined errors start with this code
YI GOLD suggestions

Inspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description.

MetaQuotes
MT4 · Trade return codes0 ERR_NO_ERRORNo error returned
YI GOLD suggestions

Do not treat this as a failure. Still check the function return value and operation state.

MetaQuotes
MT4 · Trade return codes1 ERR_NO_RESULTNo error returned, but the result is unknown
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes2 ERR_COMMON_ERRORCommon error
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes3 ERR_INVALID_TRADE_PARAMETERSInvalid trade parameters
YI GOLD suggestions

Compare each argument and reference mode with the official signature. Validate ranges and preserve relevant failure context.

MetaQuotes
MT4 · Trade return codes4 ERR_SERVER_BUSYTrade server is busy
YI GOLD suggestions

Serialize account requests, verify previous outcomes, reduce frequency and use bounded backoff.

MetaQuotes
MT4 · Trade return codes5 ERR_OLD_VERSIONOld version of the client terminal
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes6 ERR_NO_CONNECTIONNo connection with trade server
YI GOLD suggestions

Inspect connectivity, logs and request time. Verify actual order status before bounded retries with backoff to avoid duplicate exposure after a timeout.

MetaQuotes
MT4 · Trade return codes7 ERR_NOT_ENOUGH_RIGHTSNot enough rights
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes8 ERR_TOO_FREQUENT_REQUESTSToo frequent requests
YI GOLD suggestions

Serialize account requests, verify previous outcomes, reduce frequency and use bounded backoff.

MetaQuotes
MT4 · Trade return codes9 ERR_MALFUNCTIONAL_TRADEMalfunctional trade operation
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes64 ERR_ACCOUNT_DISABLEDAccount disabled
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes

Official meanings and YI GOLD suggestions are presented separately. References are verified during version builds; page visits do not fetch external sites.