problem in new MQL4

 

hi friends .

i have a problem with new MQL4.... in this version my expert dont work properly... this Error appear : array is out of range...and 4051 error...i have a array in this EA and it worked very good in old MQL4... what can i do ????

 
You can FIX the broken program or compile it under the old compiler.
 
in old compiler everything is ok.but i have problem in new mql4.... :(
 
2285178:
in old compiler everything is ok.but i have problem in new mql4.... :(

If you can't code, why are you compiling the program with the new mql4 ?

Compile it with the old compiler 509, and copy the .ex4 to the new folder. Otherwise you have to find a way to fix the code.

 

i haven't problem with comple bro.ok?

my problem is in catching position .... after a while metatrader say that : array out of range ...do u know this error in mql4 ?

 
2285178: i haven't problem with comple bro.ok?

Your problem is that you are hard of reading.

The old compiler allowed out of range references and returned zero. The new doesn't.

Asked and previously answered: "You can FIX the broken program or compile it under the old compiler."

 
2285178:

hi friends .

i have a problem with new MQL4.... in this version my expert dont work properly... this Error appear : array is out of range...and 4051 error...i have a array in this EA and it worked very good in old MQL4... what can i do ????


If you have the source file, when you get the array out of range report in the experts tab, it should also include the line and column number, so you can pinpoint the error
 
2285178:

hi friends .

i have a problem with new MQL4.... in this version my expert dont work properly... this Error appear : array is out of range...and 4051 error...i have a array in this EA and it worked very good in old MQL4... what can i do ????

the array index value come out of admitted values > max or < min

find the lines where the array is used and where its index (position) is calculated
and check the values before to assign them

before each line calling the array you can add a:

if (index > max OR index < min) Alert("line XXX");

this is the way to spot the problem

 
can u make a example for me plz ?
 
2285178: can u make a example for me plz ?
We can, can you? learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
Reason: