User defined array, not getting a value

 

Hi,

I have a wired problem with my array.

I used to be a programmer, and I never had this kind of problem before...

Do I need something special to use array in EA?

Below is simply not working.

Chinkou_Buffer[i]=Close[i]

When I Print() these three values, i and Close[i] have values.

Chinkou_Buffer[i] is decleared as double, which is same as Close.

Your advice is much appreciated!

 
Have you sized the array?
 
miko.szy:

Hi,

I have a wired problem with my array.

I used to be a programmer, and I never had this kind of problem before...

Do I need something special to use array in EA?

Below is simply not working.

Chinkou_Buffer[i]=Close[i]

When I Print() these three values, i and Close[i] have values.

Chinkou_Buffer[i] is decleared as double, which is same as Close.

Your advice is much appreciated!

Is it a buffer in an Indicator or an array in a Script/EA ? for an array you have to declare it with a fixed size or ArrayResize() it . . .
Reason: