*** Allocating Arrays within the init Function ***

 

B"H


Hello,


Is there any restriction on accessing / allocating (using ArrayResize) local EA arrays from within EA's "init" method?

It produces errors.

Solution?


Thanks,

Simha

 

Simha:
Is there any restriction on accessing / allocating (using ArrayResize) local EA arrays from within EA's "init" method?
It produces errors.

What errors? Post the code.
double  arr[];
int init(){
   if (ArrayResize(arr, size) <= 0)
      Alert("ArrayResize failed: "+GetLastError());
}
Reason: