Here is my code
Code: Select all
var: Counter (0),J(0),MaxLines (0);
array: arrLineValue [] (0);
if date <> date[1] then
begin
Counter=Counter+1;
MaxLines = 6;
array_setmaxindex(arrLineValue,5);
arrLineValue[0] = 1;
arrLineValue[1] = 3;
arrLineValue[2] = 7;
arrLineValue[3] = 2;
arrLineValue[4] = 3;
arrLineValue[5] = 7;
end;
if Counter>=1 then
begin
For J = 0 To MaxLines-1
begin
if array_getmaxindex(arrLineValue) <> 5 then raiseruntimeerror(Text("arrLineValue",MaxLines ));
if Close crosses above arrLineValue[J] then
Print("Test");
end;
end;
How come? I've set the max index to 5. And it really is 5. I check it just before with:
Code: Select all
if array_getmaxindex(arrLineValue) <> 5 then raiseruntimeerror(Text("arrLineValue",MaxLines ));
Thanks for your help!