--- "david.weilmuenster" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The AmiBroker interface to TeleChart does a good job of importing
> TeleChart's Industry info, including mapping stocks to Industries, but
> I'm running into one problem.
>
> With IndustryID(), it's easy to get the consecutive Industry number
> or Industry Name (not Symbol) for a Stock.
>
> But how does one retrieve the Industry Ticker Symbol?
>
Here is one way to get the industry and sub-industry ... it's not
what I use but it should work assuming you have not changed the
broker.{sectors,industries} and of course you should retrieve the
latest sector/industries assignment once in a while to sync
the AB DB to telechart:
http://www.purebytes.com/archives/amibroker/2007/msg08112.html
> It doesn't seem to be any variant of IndustryID().
>
> The code below returns the correct answer in industry_sym, but it
> seems like far too much churning for a simple lookup.
>
> Is there a built-in function that I'm missing?
>
No, not that I know of.
>
> Thanks,
> David
>
> ++++++++++++++++++++++++++++++++++++++++++++++
>
> industry_symlist =
> CategoryGetSymbols(categoryGroup,
> CategoryFind("Industry Group Average",
> categoryGroup
> )
> );
>
> stock_industryid = IndustryID(0);
> stop_loop = False;
>
> for( i = 0;
> (NOT stop_loop) AND
> ( sym = StrExtract( industry_symlist, i ) ) != ""; i++
> )
> {
> SetForeign(sym);
> if(stock_industryid == IndustryID(0))
> {industry_sym = sym;
> stop_loop = True;
> }
> RestorePriceArrays();
> }
>
>
>
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping