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

[amibroker] Is it possible to get media group symbol from its name with TC2005?



PureBytes Links

Trading Reference Links

Hello,

I've been trying to find a way to get the ticker symbol for a TC2005 
media group. There appears to be no general way to get the symbol 
corresponding to a stock name. For example, how to determine that the 
ticker for "Agricultural chemicals" is MG113.

There exists the GetBaseIndex() function, but it seems to need each 
and every stock to have its base index manually set to its 
corresponding MG.

I tried the following code to do it, but it doesn't always work. 
Sometimes it doesn't find the symbol, and a blank is printed in the 
title. For example, CFW has its MG displayed in the title, but not 
CFX. Also, I suppose that there must be an easier way to do this!

Can anyone help, or am I so plain stupid, that I've missed something 
simple?

- Paul

Industry = IndustryID(1);
IndustryNum = IndustryID();
SectorNum = SectorID();
"Industry: " + IndustryNum ;
"Sector: " + SectorNum ;
"Category: " + CatName = CategoryGetName( categoryGroup, 4);
"BaseIndex: " +  MG = GetBaseIndex();

IndustryList = CategoryGetSymbols( categoryGroup, 4);
MGTicker = "";
for( j = 0; ( MG = StrExtract( IndustryList , j ) ) != ""; j++ )
{
  SetForeign(MG);
  IndustryName = FullName();
  if( IndustryName == Industry )
  {  
    MGTicker = MG ;
  }
  RestorePriceArrays();
} 
"MG Ticker: " + MGTicker;
Title = EncodeColor(colorBlue) + Name() + " - " + Date() + ", O = " 
  + O + ", H = " + H + ", L = " + L + ", " + "C = " + C + ", " 
  + MGTicker ; 






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