Position & Risk
Size exposure using equity, stop distance and actual specifications.
Search official trade, runtime and compilation codes and warnings. Calculate risk using actual contract specifications.
Size exposure using equity, stop distance and actual specifications.
Estimate margin, tick value and price-move value.
A mathematical scenario, not a forecast of strategy returns.
Calculations run locally in your browser. Inputs are not uploaded or saved. Terminal and broker margin rules apply; estimates exclude slippage, commission and swap.
1171 matching records
| Platform / category | Code / constant | Official meaning | Troubleshooting |
|---|---|---|---|
| MT5 · Compilation errors | 401 | Inheritance from the class is impossible, since it is declared with the final specifier | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 402 | Cannot redefine a method declared with the final specifier | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 403 | The final specifier can be applied only to virtual functions | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 404 | The method marked by the override specifier actually does not override any base class function | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 405 | A specifier is not allowed in defining a function, but only in declaring | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 406 | Cannot cast the type to the specified one | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 407 | The type cannot be used for a resource variable | YI GOLD suggestionsCheck permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access. MetaQuotes |
| MT5 · Compilation errors | 408 | Error in the project file | YI GOLD suggestionsCheck permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access. MetaQuotes |
| MT5 · Compilation errors | 409 | Cannot be used as a union member | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 410 | Ambiguous choice for the name, the usage context should be explicitly defined | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 411 | The structure cannot be used from DLL | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 412 | Cannot call a function marked by the delete specifier | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Compilation errors | 413 | MQL4 is not supported. To compile this program, use MetaEditor from your MetaTrader 4 installation folder | YI GOLD suggestionsLocate the first reported line in MetaEditor. Check syntax, types, function signatures, includes and file permissions, then recompile. MetaQuotes |
| MT5 · Runtime errors | 0 ERR_SUCCESS | The operation completed successfully | YI GOLD suggestionsDo not treat this as a failure. Still check the function return value and operation state. MetaQuotes |
| MT5 · Runtime errors | 4001 ERR_INTERNAL_ERROR | Unexpected internal error | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4002 ERR_WRONG_INTERNAL_PARAMETER | Wrong parameter in the inner call of the client terminal function | YI GOLD suggestionsCompare each argument and reference mode with the official signature. Validate ranges and preserve relevant failure context. MetaQuotes |
| MT5 · Runtime errors | 4003 ERR_INVALID_PARAMETER | Wrong parameter when calling the system function | YI GOLD suggestionsCompare each argument and reference mode with the official signature. Validate ranges and preserve relevant failure context. MetaQuotes |
| MT5 · Runtime errors | 4004 ERR_NOT_ENOUGH_MEMORY | Not enough memory to perform the system function | YI GOLD suggestionsReduce recursion and large local arrays, review allocation/release, batch history processing and check memory-operation results. MetaQuotes |
| MT5 · Runtime errors | 4005 ERR_STRUCT_WITHOBJECTS_ORCLASS | The structure contains objects of strings and/or dynamic arrays and/or structure of such objects and/or classes | YI GOLD suggestionsCheck length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access. MetaQuotes |
| MT5 · Runtime errors | 4006 ERR_INVALID_ARRAY | Array of a wrong type, wrong size, or a damaged object of a dynamic array | YI GOLD suggestionsCheck length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access. MetaQuotes |
| MT5 · Runtime errors | 4007 ERR_ARRAY_RESIZE_ERROR | Not enough memory for the relocation of an array, or an attempt to change the size of a static array | YI GOLD suggestionsCheck length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access. MetaQuotes |
| MT5 · Runtime errors | 4008 ERR_STRING_RESIZE_ERROR | Not enough memory for the relocation of string | YI GOLD suggestionsReduce recursion and large local arrays, review allocation/release, batch history processing and check memory-operation results. MetaQuotes |
| MT5 · Runtime errors | 4009 ERR_NOTINITIALIZED_STRING | Not initialized string | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4010 ERR_INVALID_DATETIME | Invalid date and/or time | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4011 ERR_ARRAY_BAD_SIZE | Total amount of elements in the array cannot exceed 2147483647 | YI GOLD suggestionsCheck length, bounds, dynamic-array declarations and ArraySetAsSeries. Validate returned element counts before access. MetaQuotes |
| MT5 · Runtime errors | 4012 ERR_INVALID_POINTER | Wrong pointer | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4013 ERR_INVALID_POINTER_TYPE | Wrong type of pointer | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4014 ERR_FUNCTION_NOT_ALLOWED | Function is not allowed for call | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4015 ERR_RESOURCE_NAME_DUPLICATED | The names of the dynamic and the static resource match | YI GOLD suggestionsCheck permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access. MetaQuotes |
| MT5 · Runtime errors | 4016 ERR_RESOURCE_NOT_FOUND | Resource with this name has not been found in EX5 | YI GOLD suggestionsCheck permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access. MetaQuotes |
| MT5 · Runtime errors | 4017 ERR_RESOURCE_UNSUPPORTED_TYPE | Unsupported resource type or its size exceeds 16 Mb | YI GOLD suggestionsCheck permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access. MetaQuotes |
| MT5 · Runtime errors | 4018 ERR_RESOURCE_NAME_IS_TOO_LONG | The resource name exceeds 63 characters | YI GOLD suggestionsCheck permitted terminal sandbox paths, names, access flags, formats and handles. Record open failures without granting permissive directory access. MetaQuotes |
| MT5 · Runtime errors | 4019 ERR_MATH_OVERFLOW | Overflow occurred when calculating math function | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4020 ERR_SLEEP_ERROR | Out of test end date after calling Sleep() | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4022 ERR_PROGRAM_STOPPED | Test forcibly stopped from the outside. For example, optimization interrupted, visual testing window closed or testing agent stopped | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4023 ERR_INVALID_TYPE | Invalid type | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4024 ERR_INVALID_HANDLE | Invalid handle | YI GOLD suggestionsInspect terminal logs and the failing function return value. Check inputs, array bounds, resources, connectivity and required permissions against the official description. MetaQuotes |
| MT5 · Runtime errors | 4025 ERR_TOO_MANY_OBJECTS | Object pool filled out | YI GOLD suggestionsVerify chart ID, object existence and property types. Check creation/update results and avoid name collisions. MetaQuotes |
| MT5 · Runtime errors | 4101 ERR_CHART_WRONG_ID | Wrong chart ID | YI GOLD suggestionsVerify symbol, timeframe, indicator handle, BarsCalculated and copied element counts. Wait for data availability rather than filling missing prices with zeros. MetaQuotes |
| MT5 · Runtime errors | 4102 ERR_CHART_NO_REPLY | Chart does not respond | YI GOLD suggestionsVerify symbol, timeframe, indicator handle, BarsCalculated and copied element counts. Wait for data availability rather than filling missing prices with zeros. MetaQuotes |
Official meanings and YI GOLD suggestions are presented separately. References are verified during version builds; page visits do not fetch external sites.