[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,

You can "capture & hold" a specific IndustryID by using the OLE-
properties. An example:

AB=CreateObject("Broker.Application")

Stocks=AB.Stocks();
SpecificStock=Stocks.Item("MSFT");
SpecStIndus=SpecificStock.IndustryID();
etc.

Hope this helps,

PS

--- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx> wrote:
> Hi,
> 
> I believe SetForeign only replaces price/volume arrays. IndustryID 
remains 
> that of current ticker, so will always be true.
> 
> Steve
> 
> ----- Original Message ----- 
> From: "dicric_71" <richard@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, September 27, 2005 4:47 AM
> Subject: [amibroker] My own function in Exploration - problem
> 
> 
> > 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
> >
> >
> >
> >
> >
> >
> >




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