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

[amibroker] Re: Extracting MG Industry Group Closing Price



PureBytes Links

Trading Reference Links

Thank you all for your replies.

Creating a database from TeleChart does pull up and map the 
Industries to stocks.  I need to correct myself in that I'm using 
TeleChart 2005 - their latest version.

As far as I can figure it out (and as Graham pointed out), 
GetBaseIndex pulls up the symbol that has been manually input into 
the "Base indexes for Relative Strength" field in Symbol-Categories-
Industries.  If there is nothing there then GetBaseIndex doesn't seem 
to work.

So I added a few MG symbols and it seems to work fine - Thanks Dan.

However, I was wondering if there is a way to program in AFL to be 
able to pull these symbols without manually entering all 239 of 
them.  This would make any database updates or re-installs so much 
simpler and reduce errors due to entering the data by hand.  An AFL 
solution would also take care of any re-classifications by MG (Media 
General).

I should point out that the MG Industry symbol is part of the 
Industry list automatically created when setting up the database.

For example, working my way down from the Sector category - 

Sectors - Tobacco - Cigarettes

This list contains the following symbols

BTI
CG
GLH
ITY
MG351
MO
RAI
STSI
VGR

Let's say we are looking at BTI.

Would it be possible to have AFL look at the Industry list that BTI 
is in and then go down that list to pull the MG industry symbol 
(MG351)?

Really appreciate your help.



--- In amibroker@xxxxxxxxxxxxxxx, "Dan Clark" <dan_public@xxxx> wrote:
>
> Graham,
> 
>  
> 
> I don't use TC2000 anymore, but I recall that the industries and 
sectors,
> and their mapping to a stock can be retrieved when creating the 
database.
> I.e., retrieving them sets the symbol to industry/sector mapping
> automatically.  You don't have to set the symbols.  
> 
>  
> 
> I just tested this by creating a new TC2000 DB in AB and then 
pointed it at
> the TC2005 plugin (my old TC installation is still there).  Then I 
retrieved
> the symbols, and the Sector/Industry mappings.  It worked fine, and 
the code
> below retrieved the Industry symbol correct.  
> 
>  
> 
> Are you referring to something different?
> 
>  
> 
> Regards,
> 
>  
> 
> Dan.
> 
>  
> 
>   _____  
> 
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On Behalf
> Of Graham
> Sent: Saturday, October 08, 2005 10:10 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Extracting MG Industry Group Closing Price
> 
>  
> 
> assuming you have set the index symbols for the industries in
> Symbol-Category
> 
> 
> 
> On 10/9/05, Dan Clark <dan_public@xxxx> wrote:
> >
> >
> > HI,
> >
> >
> >
> > Try:
> >
> >
> >
> > IndustrySymbol = GetBaseIndex() ;
> >
> >
> >
> > Then you can use Foreign, SetForeign, PlotForeign, etc.
> >
> >
> >
> > From here it's pretty easy to get the Sector Symbol also.  In 
TC2005, the
> > Sector Symbol can be generated by replacing the last digit of an 
Industry
> > Symbol with a zero ("0").  So, the Sector Symbol for MG747 is 
MG740.
> >
> >
> >
> > Regards,
> >
> >
> >
> > Dan.
> >
> >
> > ________________________________
> >
> >
> > From: amibroker@xxxxxxxxxxxxxxx 
[mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf
> > Of quirinus
> > Sent: Saturday, October 08, 2005 9:19 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Extracting MG Industry Group Closing Price
> >
> >
> >
> > Hi,
> >
> > I use TC2000 for end of day data.  Basically what I would like to 
do
> > is to be able to pull up the closing price of a stock's Industry
> > Group Average.
> >
> > For example - American Eagle Outfitter (AEOS) is part of the
> > Specialty Retail - Apparel Stores Industry Group (MG747).
> >
> > I'm trying to implement a simple Industry Group Relative Strength
> > graph while looking at a stock - so that as I go through stocks 
the
> > graph will automatically pick up the appropriate MG Industry Group
> > and plot the stock's Relative Strength.
> >
> > So, if I'm looking at AEOS, my formula will pick up MG747 close 
and
> > graph the Relative Strength of AEOS vs MG747.
> >
> > When I move on to another stock, the formula should pick up the
> > appropriate MG Group close automatically.
> >
> > I just need to pick up the closing price of the MG Industry Group
> > based on the stock I'm looking at.
> >
> > I've tried using
> >
> > MG_Close = Foreign(IndustryID(1),"Close");
> >
> > but that doesn't seem to work.
> >
> > Would someone be please kind enough to help me figure this out.
> >
> > Thanks
> >
> >
> >
> >
> >
> >
> > 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
> >
> >  Visit your group "amibroker" on the web.
> >
> >  To unsubscribe from this group, send an email to:
> >  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >
> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.
> >  To unsubscribe from this group, send an email to:
> >  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >
> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.
> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.
> > ________________________________
> >
> >
> >
> 
> 
> --
> 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
> 
> 
> 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
> 
> 
> 
> 
> 
> 
> SPONSORED LINKS 
> 
> 
> Investment
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+management+software&w1=Inves
> 
tment+management+software&w2=Real+estate+investment+software&w3=Invest
ment+p
> 
roperty+software&w4=Software+support&w5=Real+estate+investment+analysi
s+soft
> ware&w6=Investment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZNcMu4KNQ>
> management software 
> 
> Real
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+software&w1=Inve
> 
stment+management+software&w2=Real+estate+investment+software&w3=Inves
tment+
> 
property+software&w4=Software+support&w5=Real+estate+investment+analys
is+sof
> 
tware&w6=Investment+software&c=6&s=200&.sig=5_sgDczz3ArKGMtJ9tFSJA>  
estate
> investment software 
> 
> Investment
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+property+software&w1=Investm
> 
ent+management+software&w2=Real+estate+investment+software&w3=Investme
nt+pro
> 
perty+software&w4=Software+support&w5=Real+estate+investment+analysis+
softwa
> re&w6=Investment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6oX5WZw>  
property
> software 
> 
> 
> Software
> <http://groups.yahoo.com/gads?
t=ms&k=Software+support&w1=Investment+manageme
> 
nt+software&w2=Real+estate+investment+software&w3=Investment+property+
softwa
> 
re&w4=Software+support&w5=Real+estate+investment+analysis+software&w6=
Invest
> ment+software&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w>  support 
> 
> Real
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+analysis+softwar
> 
e&w1=Investment+management+software&w2=Real+estate+investment+software
&w3=In
> 
vestment+property+software&w4=Software+support&w5=Real+estate+investme
nt+ana
> 
lysis+software&w6=Investment+software&c=6&s=200&.sig=GmF8PlAJASx0wrSaX
5-Zlw>
> estate investment analysis software 
> 
> Investment
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+software&w1=Investment+manag
> 
ement+software&w2=Real+estate+investment+software&w3=Investment+proper
ty+sof
> 
tware&w4=Software+support&w5=Real+estate+investment+analysis+software&
w6=Inv
> estment+software&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg>  software 
> 
>  
> 
>   _____  
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *	 Visit your group "amibroker
> <http://groups.yahoo.com/group/amibroker> " on the web.
>   
> *	 To unsubscribe from this group, send an email to:
>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe> 
>   
> *	 Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>  Terms of Service. 
> 
>  
> 
>   _____
>






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