Download MetaTrader 5
To add comments, please log in or register
You can test an application before buying it. Find out how to do that!
adheer
15
adheer 2015.06.18 08:45 

I came across a MT4 EA with approximately 10,700 lines of code and 1140 functions. I know this is a ridiculously large file and number of functions.

When I complile the file, it compiles fine (no errors), but I get an error internal error #-1017

So my questions are :
1) What is the cause of this internal error 1017 ?

2) What is the maximum number of variables, or functions allowed by MT4 ?

 

I am using MetaEditor version 5.00 build 1150 version 2015. 

whroeder1
13627
whroeder1 2015.06.18 12:04  

If the complier gives an internal error, it does not compile fine, it didn't compile at all.

The compiler got totally confused. Likely a missing parenthesis or bracket. Put a #ifdef whr / #endif around half and fix errors in the other half.

Ilyas
1184
Ilyas 2015.06.18 17:57  

Something wrong with imports.

Please write to the ServiceDesk.

adheer
15
adheer 2015.06.19 06:58  
WHRoeder:

If the complier gives an internal error, it does not compile fine, it didn't compile at all.

The compiler got totally confused. Likely a missing parenthesis or bracket. Put a #ifdef whr / #endif around half and fix errors in the other half.

It compiles (syntactically) perfectly fine. It seems to complain at the end of the compilation. There are no #includes, or #ifdef or pre-processor directives.

For example, if I deliberately introduce syntactical errors in the indicator, it points out those errors precisely. In this case it does not complain of internal error #-1017.

E.g., I randomly added "int x = 4" (missing semi-colon error) in the init() function. It pointed out that error correctly (semi-colon expected) and did not show the internal error #-1017.

adheer
15
adheer 2015.06.19 07:03  

Here is the indicator attached (TestIndicator.mq4).

It was generated from some template software - has around 11,700 lines of code and around 1140 functions. It is  bloated and perhaps useless (and I have no idea what it does).

I am just trying to understand what is the cause of the internal error #-1017 

 

I suspect MT4 has a limitation of 1024 (or something close by) functions, because if I comment out a few functions it compiles perfectly fine. 

Files:
Ilyas
1184
Ilyas 2015.06.19 07:50  
adheer:

Here is the indicator attached (TestIndicator.mq4).

It was generated from some template software - has around 11,700 lines of code and around 1140 functions. It is  bloated and perhaps useless (and I have no idea what it does).

I am just trying to understand what is the cause of the internal error #-1017 

 

I suspect MT4 has a limitation of 1024 (or something close by) functions, because if I comment out a few functions it compiles perfectly fine. 

Thank you for the code.

I found error in the line 3387

    if ((iCustom(NULL, NULL, NULL, PERIOD_M1, "TL_BUY_Entry_Fast_MA_1",0,2)

Third parameter is NULL, this is incorrect. Рlease check it.

The compiler has been fixed. This error will not appear in the next compiler build.
adheer
15
adheer 2015.06.19 12:22  
mql5:
Thank you for the code.

I found error in the line 3387


Third parameter is NULL, this is incorrect. Рlease check it.

The compiler has been fixed. This error will not appear in the next compiler build.

You are right, that seems to be the problem.

 

Thank you very much. 

/
To add comments, please log in or register