PureBytes Links
Trading Reference Links
|
I modified the following script as a test to try to declare an array
with 800 elements. The error message is:
Error 10
Subscript out of range.
You must not access array elements outside 0..(BarCount-1) range.
If there is a way to make a larger array please point me to the
section in the help file.
Regards,
Sam
Listnum = Param( "Watchlist", 5, 0, 100, 0 );// Watchlist to display.
// the start point of comparision will be StartPoint bar
sp = Param( "Startpoint %", 55, 1, 100, 1 );
startpoint = int(BarCount*(sp/100));
// Here is a base line - We Use Currenty Selected Ticker.
// (Use an Index as your Base eg XAO,XEJ,XMJ Etc...)
price = Close;
baseline = 100 * ( price/ValueWhen( Cum(1) == startpoint, price ) - 1 );
// base line chart (flat line)
Plot ( baseline - baseline,Name(),6,1);
TickerScore[800] = 0; // test
list = CategoryGetSymbols( categoryWatchlist, listnum );
for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
{
price = Foreign( sym, "C" );
Plot (100 * ( price/ValueWhen( Cum(1) == startpoint, price ) - 1 )-
baseline,sym,6+i,1);
}
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> create a new larger array ticker to the size you want
>
> On 9/1/05, sam_92841 <sam_92841@xxxx> wrote:
> > http://www.amibroker.com/library/formula.php?id=434
> >
> > I found this script which attempts to rank stocks, however it fails if
> > the number of tickers in the watchlist is greater than BarCount.
> >
> > Is it possible to create an array with more elements than barcount? I
> > cannot find a way to do that.
> >
> > Regards,
> >
> > Sam
> >
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
------------------------ Yahoo! Groups Sponsor --------------------~-->
Help tsunami villages rebuild at GlobalGiving. The real work starts now.
http://us.click.yahoo.com/njNroD/KbOLAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
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
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|