[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

Hi,

I used OR because I need only one positive test.
I changed it in last version of my function to:
if (IndustryID() == testind) Cond=True;

But it does not help. 

--- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
> 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:amibro
ker@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@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
> | 
> | 
> | ------------------------ 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 --------------------~--> 
Put more honey in your pocket. (money matters made easy).
http://us.click.yahoo.com/r7D80C/dlQLAA/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/