[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Re: Subscript out of range - why?



PureBytes Links

Trading Reference Links

You could use an extrenal table for independant arrays, like OSAKA.
 
Or for short arrays I prefer simply to use a number of static variables (dynamically named for each element), or I place the numbers in a static string. Both methods work well for arrays up to about 100 elements - if your code doesn't use up your computer resources in other ways.
 
best regards,
herman.
-----Original Message-----
From: giggollo99 [mailto:giggollo@xxxxxxxxxxx]
Sent: Friday, April 01, 2005 7:16 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Subscript out of range - why?


Thanks Tomasz and MagicTH for your comments:

Tomasz: Ok, i see what the problem is now. However, i was just
wondering why is any FOR loop index always tied to the Barcount..i
would like to use the f array to do other non-stock-data processing,
(eg evaluate a set of criteria and then loop on them) so i dont want
to be limited by Barcount, because the f array index in my case has
nothing to do with OHLC bars, in fact it represents an iterator over
my set of criteria (say 10 criteria) for example. i want to be free to
set the index as i wish, like you would with a normal C array, is it
possible?

MagicTH: As Tomasz mentioned, the reason i am getting the error is
that some of the stocks i am exploring have a very low value of
Barcount. I don't think it has anything to do with Amibroker version.

Thanks a lot,
g


--- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> Copying your code AND un-commenting the second line does NOT cause
a
> subscript error on my system using 4.70rc3
>
> Terry
>
> giggollo99 wrote:
>
> >Thanks kavemanperth for your reply. Here is my full code:
> >
> >f[0]=0;
> >//f[1]=0;
> >Filter=1;
> >NumColumns=1;
> >
> >I have nothing else in my AA window except the above 4 lines of
code
> >(try it). If i uncomment the second line i get an "Subscript out of
> >range" error in that second line when i run an exploration. I know
the
> >code is not doing anything useful, im trying to isolate the
problem,
> >and understand why i cant index the second element of array "f".
> >
> >Thanks in advance,
> >g
> >
> >
> >
> > 
> >
> > 
> >





Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





Yahoo! Groups Links