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
MT5 · Runtime errors5003 ERR_TOO_LONG_FILENAMEToo long file name
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5004 ERR_CANNOT_OPEN_FILEFile opening error
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5005 ERR_FILE_CACHEBUFFER_ERRORNot enough memory for cache to read
YI GOLD suggestions

Reduce recursion and large local arrays, review allocation/release, batch history processing and check memory-operation results.

MetaQuotes
MT5 · Runtime errors5006 ERR_CANNOT_DELETE_FILEFile deleting error
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5007 ERR_INVALID_FILEHANDLEA file with this handle was closed, or was not opening at all
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5008 ERR_WRONG_FILEHANDLEWrong file handle
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5009 ERR_FILE_NOTTOWRITEThe file must be opened for writing
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5010 ERR_FILE_NOTTOREADThe file must be opened for reading
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5011 ERR_FILE_NOTBINThe file must be opened as a binary one
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5012 ERR_FILE_NOTTXTThe file must be opened as a text
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5013 ERR_FILE_NOTTXTORCSVThe file must be opened as a text or CSV
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5014 ERR_FILE_NOTCSVThe file must be opened as CSV
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5015 ERR_FILE_READERRORFile reading error
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5016 ERR_FILE_BINSTRINGSIZEString size must be specified, because the file is opened as binary
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5017 ERR_INCOMPATIBLE_FILEA text file must be for string arrays, for other arrays - binary
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5018 ERR_FILE_IS_DIRECTORYThis is not a file, this is a directory
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5019 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
MT5 · Runtime errors5020 ERR_FILE_CANNOT_REWRITEFile can not 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
MT5 · Runtime errors5021 ERR_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
MT5 · Runtime errors5022 ERR_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
MT5 · Runtime errors5023 ERR_FILE_ISNOT_DIRECTORYThis is a file, not a directory
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5024 ERR_CANNOT_DELETE_DIRECTORYThe directory cannot be removed
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5025 ERR_CANNOT_CLEAN_DIRECTORYFailed to clear the directory (probably one or more files are blocked and removal operation failed)
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5026 ERR_FILE_WRITEERRORFailed to write a resource to a file
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5027 ERR_FILE_ENDOFFILEUnable to read the next piece of data from a CSV file (FileReadString, FileReadNumber, FileReadDatetime, FileReadBool), since the end of file is reached
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5030 ERR_NO_STRING_DATENo date in the string
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
MT5 · Runtime errors5031 ERR_WRONG_STRING_DATEWrong date in the string
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
MT5 · Runtime errors5032 ERR_WRONG_STRING_TIMEWrong time in the string
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
MT5 · Runtime errors5033 ERR_STRING_TIME_ERRORError converting string to date
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
MT5 · Runtime errors5034 ERR_STRING_OUT_OF_MEMORYNot enough memory for the string
YI GOLD suggestions

Reduce recursion and large local arrays, review allocation/release, batch history processing and check memory-operation results.

MetaQuotes
MT5 · Runtime errors5035 ERR_STRING_SMALL_LENThe string length is less than expected
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
MT5 · Runtime errors5036 ERR_STRING_TOO_BIGNUMBERToo large number, more than ULONG_MAX
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
MT5 · Runtime errors5037 ERR_WRONG_FORMATSTRINGInvalid format string
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
MT5 · Runtime errors5038 ERR_TOO_MANY_FORMATTERSAmount of format specifiers more than the parameters
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5039 ERR_TOO_MANY_PARAMETERSAmount of parameters more than the format specifiers
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5040 ERR_WRONG_STRING_PARAMETERDamaged parameter of string type
YI GOLD suggestions

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

MetaQuotes
MT5 · Runtime errors5041 ERR_STRINGPOS_OUTOFRANGEPosition outside the string
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
MT5 · Runtime errors5042 ERR_STRING_ZEROADDED0 added to the string end, a useless operation
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
MT5 · Runtime errors5043 ERR_STRING_UNKNOWNTYPEUnknown data type when converting to a string
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
MT5 · Runtime errors5044 ERR_WRONG_STRING_OBJECTDamaged string object
YI GOLD suggestions

Verify chart ID, object existence and property types. Check creation/update results and avoid name collisions.

MetaQuotes

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