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?
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?
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();
}