PureBytes Links
Trading Reference Links
|
I think I'm starting to get it.
I'll be checking back every few weeks because I (otherwise) really
like Amibroker and I will buy it when all the problems get worked out.
Good luck and thanks for your help.
Sam
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> you can access it provided it is the base symbol.
>
> this may not help but have you tried adding
Setbarsrequired(10000,10000);
>
> On 9/4/05, sam_92841 <sam_92841@xxxx> wrote:
> > >Yes, but this is the barcount for QQQQ.
> > >If you have no data in TestArray, there is no barcount
> >
> > LOL well which is it? Neuro said (and I understand the documentation
> > to read) that arrays are initailized with barcount elements.
> > Therefore I should be able to access the 800th element of an array
> > when I am using a ticker with a barcount of > 800, correct?
> >
> > By the way my ultimate objective in all of this is to get this script
> > to run against my watchlist of the S&P 600 Smallcap index:
> >
> > http://www.amibroker.com/library/formula.php?id=434
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
> > > Yes, but this is the barcount for QQQQ.
> > > If you have no data in TestArray, there is no barcount (well maybe 0
> > > works). Barcount is per ticker and depends on how much data is
there.
> > >
> > > Do as Graham suggested and populate a dummy ticker or duplicate
another
> > > one, like QQQQ, and rename to TestArray. You can zero out the
values or
> > > replace them with a loop.
> > > --
> > > Terry
> > >
> > > | -----Original Message-----
> > > | From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx] On
> > > | Behalf Of sam_92841
> > > | Sent: Saturday, September 03, 2005 14:58
> > > | To: amibroker@xxxxxxxxxxxxxxx
> > > | Subject: [amibroker] Re: Array question
> > > |
> > > | 1.) Show the chart of QQQQ (data from March 2000 to present)
> > > | 2.) Click analysis, commentary. Click load and open the script
> > > | containing only the two lines shown below.
> > > | 3.) Click apply, then commentary tab. Says "barcount is
1,634.000"
> > > | 4.) Close Commentary
> > > | 5.) Click analysis, formula editor, open same script opened in
> > > | Commentary. Click apply indicator. Get the "Subscript out of
> > > | range..." error.
> > > |
> > > |
> > > |
> > > | --- In amibroker@xxxxxxxxxxxxxxx, neurotic self
<neuroticself@xxxx>
> > > | wrote:
> > > | > Uh? it works for me as expected in a commentary window on a
single
> > > | > symbol, just fails if I put a number >= BarCount
> > > | >
> > > | > Where/how do you run the last script?
> > > | >
> > > | > On 9/3/05, sam_92841 <sam_92841@xxxx> wrote:
> > > | > > Thanks neuro. I think I understand what Graham said
however I am
> > > | > > still having problems. The following script indicates
there are
> > > | 1684
> > > | > > bars for QQQQ but the script still fails with the same error.
> > > | > >
> > > | > > "barcount is " + NumToStr(BarCount);
> > > | > > TestArray[800] = 0; // test
> > > | > >
> > > | > >
> > > | > >
> > > | > > --- In amibroker@xxxxxxxxxxxxxxx, neurotic self
> > > | <neuroticself@xxxx> wrote:
> > > | > > > Hi Sam,
> > > | > > >
> > > | > > > just a clarification, ignore if useless to you.
> > > | > > >
> > > | > > > TickerScore[800] = 0;
> > > | > > >
> > > | > > > AFAIK this is NOT declaring an 800 items array, just
trying to
> > > | assign
> > > | > > > zero to the 800th element. All arrays are implicitly
declared
> > > | with
> > > | > > > BarCount elements, that's why Graham suggested creating
a fake
> > > | symbol
> > > | > > > with more history.
> > > | > > >
> > > | > > > neuro
> > > | > > >
> > > | > > > On 9/3/05, Graham <kavemanperth@xxxx> wrote:
> > > | > > > > for starters there are only 64 watchlists, 0.....63
> > > | > > > > Param( "Watchlist", 5, 0, 63, 0 );//
> > > | > > > >
> > > | > > > >
> > > | > > > > to create a larger ticker length, just create a new ticker
> > > | then using
> > > | > > > > excel create a long history for it in a csv file and
import
> > > | this to
> > > | > > > > AB.
> > > | > > > >
> > > | > > > >
> > > | > > > > I just loaded into AB and not really cerain what it is
meant
> > > | to do but
> > > | > > > > i got no error messages
> > > | > > > >
> > > | > > > > On 9/3/05, sam_92841 <sam_92841@xxxx> wrote:
> > > | > > > > > 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
> > > | > > > > >
> > > | > > > > >
> > > | > > > > >
> > > | > > > > >
> > > | > > > > >
> > > | > > > > > 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
> > > | > > > >
> > > | > > > >
> > > | > > > >
> > > | > > > > 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
> > > | > > > >
> > > | > > > >
> > > | > > > >
> > > | > > > >
> > > | > > > >
> > > | > > > >
> > > | > > > >
> > > | > > >
> > > | > > >
> > > | > > > --
> > > | > > > Janeczko for President!
> > > | > >
> > > | > >
> > > | > >
> > > | > >
> > > | > >
> > > | > > 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
> > > | > >
> > > | > >
> > > | > >
> > > | > >
> > > | > >
> > > | > >
> > > | > >
> > > | > >
> > > | >
> > > | >
> > > | > --
> > > | > Janeczko for President!
> > > |
> > > |
> > > |
> > > |
> > > | ------------------------ Yahoo! Groups Sponsor
--------------------~--
> > > | >
> > > | Help Sudanese refugees rebuild their lives through GlobalGiving.
> > > | http://us.click.yahoo.com/hjNroD/EbOLAA/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
> > > |
> > > |
> > > |
> > > |
> >
> >
> >
> >
> >
> > 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 --------------------~-->
Make a difference. Find and fund world-changing projects at GlobalGiving.
http://us.click.yahoo.com/PcNrnD/PbOLAA/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/
|