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

[amibroker] Re: My own function in Exploration - problem



PureBytes Links

Trading Reference Links

I changed line inside of my own function from:
list = GetCategorySymbols( categoryWatchlist, wlid );

to new version:
list = CategoryGetSymbols(categoryWatchlist,wlid);

But problem is the same. Exloration show all stocks regardless
industry. Look like function is returning true for every stock but I
do not knowwhere can be the problem.




--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> what you put inside the brackets in the definition of a function are
> the variable names to be used in that function for input data. A
> previously defined variable or array is done when you use your
custom
> function, not when you define it
> 
> On 9/27/05, dicric_71 <richard@xxxx> wrote:
> > But what is wrong with this reserved word? I do not understand
your
> > reply.
> > I use GetCategorySymbols to obtain list of all symbols in
watchlist I
> > have to go through to test their IndustryID.
> >
> > Richard
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx>
wrote:
> > > categoryWatchlist is a reserved word, used in function
> > CategoryGetSymbols
> > >
> > > On 9/27/05, dicric_71 <richard@xxxx> wrote:
> > > > Hello,
> > > >  I wrote this exploration with my own function:
> > > >
> > > > ********* code begin  ************
> > > > function SameSector(testind, wlid)
> > > > {
> > > >        Cond = False;
> > > >
> > > >        list = GetCategorySymbols( categoryWatchlist, wlid );
> > > >                for( i = 0; (((  sym = StrExtract( list, i ) )
!=
> > "") AND (NOT
> > > > Cond)); i++ )
> > > >                {
> > > >                SetForeign(sym);
> > > >                Cond = (Cond OR (IndustryID()== testind));
> > > >                RestorePriceArrays();
> > > >                };
> > > >        return Cond;
> > > > }
> > > >
> > > > Cond9= SameSector(IndustryID(),12);
> > > > Filter = Cond9;
> > > >
> > > >
> > > > AddColumn( Close, "Close  " );
> > > > AddColumn( Open, "Open  " );
> > > > AddColumn( High, "High  " );
> > > > AddColumn( Low, "Low  " );
> > > > AddColumn( Volume, "Volume      " );
> > > > AddTextColumn(IndustryID(1),"Industry");
> > > >
> > > > ********* code end  ************
> > > >
> > > > Main principle is that during exploration this function have
to
> > return
> > > > true and also Exploration should find only symbols, which
have the
> > > > same
> > > > industry as one of symbol in specific watchlist (in this
example
> > > > Watchlist nr. 12).
> > > > But it does not works. It is showing all stock also with
different
> > > > industries. Where is problem ? Could any AFL guru help me ,
what
> > is
> > > > wrong there?
> > > >
> > > > Thank you in advance,
> > > >
> > > > Richard
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 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




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/