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

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



PureBytes Links

Trading Reference Links

Also, you have said:
Cond = (Cond OR (IndustryID()== testind));

Seems like you want:
Cond = (Cond AND (IndustryID()== testind));
--
Terry

| -----Original Message-----
| From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
| Behalf Of Graham
| Sent: Tuesday, September 27, 2005 04:18
| To: amibroker@xxxxxxxxxxxxxxx
| Subject: Re: [amibroker] My own function in Exploration - problem
| 
| categoryWatchlist is a reserved word, used in function
| CategoryGetSymbols
| 
| On 9/27/05, dicric_71 <richard@xxxxxxx> 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
| 
| 
| ------------------------ 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
| 
| 
| 
| 




------------------------ 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/