Download MetaTrader 5
To add comments, please log in or register
Interested in MetaTrader 5 features? Learn more about them!
miko.szy
35
miko.szy 2014.01.28 01:36 

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!

Keith Watford
Moderator
7958
Keith Watford 2014.01.28 03:41  
Have you sized the array?
Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2014.01.28 10:03  
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 . . .
/
To add comments, please log in or register