My Ea 2019 on MT4 doesn't compil any more.. is somebody can help me :-), first step done, Thanks

 

Hi everybody,

Coming back after 3 years , triing to run my EA which ran very well before, compilation are not allowed now, it let me 3 errors.

It was running perfectly without any errors before.
there 2 sames errors about an Array, and Error about Date.

Is somebody could help ? Seems just to be able to be adjusted for the last update of MT4.

Thank you in advance if you can,

Kinds regards from Tahiti,

Daniel :-)


pj are screenshots of compil errors message and code concerned

Files:
zerr_1_a.JPG  149 kb
serr_1_b.JPG  156 kb
ierr_2_a.JPG  178 kb
 
Daniel Murger:

Hi everybody,

Coming back after 3 years , triing to run my EA which ran very well before, compilation are not allowed now, it let me 3 errors.

It was running perfectly without any errors before.
there 2 sames errors about an Array, and Error about Date.

Is somebody could help ? Seems just to be able to be adjusted for the last update of MT4.

Thank you in advance if you can,

Kinds regards from Tahiti,

Daniel :-)


pj are screenshots of compil errors message and code concerned


ati_TpVolat is an array, you need to specify the index.

So your code should be something like this:

atd_PipsHour[i][ati_TpVolat[some index here]]

The dates you are storing are not dates, they are hours and minutes.

A datetime is specified with a date. Like this:
D'2022.08.21 12:34:00'

You need to adapt the code to that.

I cannot imagine how this was working before.
 
Dominik Christian Egert #:

ati_TpVolat is an array, you need to specify the index.

So your code should be something like this:

atd_PipsHour[i][ati_TpVolat[some index here]]

The dates you are storing are not dates, they are hours and minutes.

A datetime is specified with a date. Like this:
D'2022.08.21 12:34:00'

You need to adapt the code to that.

I cannot imagine how this was working before.

Hi Dominik,

Thank you, I couldnt imagine this kind of so big mistake (index for the array ) because last compil didn't stop it , just stupid because ten  lines before with same code for the SL I had of course indicate the index.

So , this is done , Thank you.


About the datetime problem, I had searched for a long time the solution and had finaly found it in a book.  Mt4 had accepted that as "hours of the current day".

But I don't remember if have tested this function especially, perhaps MT4 just passed it.

The EA is very big and ,I was getting sick , I have stopped before to refine all.


Well thank you so much,


The compil isn't ok but this array error is over,


thank you again :-)