silly problem

 

can someone tell me why this loop doesn't store the data?

int h1;
int h2;
int h3;
int b1;
int b2;
double t1[];


b1 = iHighest(NULL,PERIOD_H1,MODE_CLOSE,700,1);
b2 = iLowest(NULL,PERIOD_H1,MODE_CLOSE,700,1);
h1 = b2;
h2 = b2;

for(h1=b2;h1<b1+1;h1++)
{
for(h2=b2;h2<b1+1;h2++)
{
t1[h1] = iClose(NULL,0,h2);
h3 = ArraySize(t1);
Comment(h3);
}
}
 
Specify the size or resize the array t1. it seems it has to be 700 or at least MathMax(b1,b2).
 
szgy74:
Specify the size or resize the array t1. it seems it has to be 700 or at least MathMax(b1,b2).

I've noticed that problem but I solved writing before the loops;

if(b1>b2)

However this does not solve the problem, the size of the array is still 0.

 
FXLoser:

However this does not solve the problem, the size of the array is still 0.

use

double t1[700];
Reason: