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

[Metastockusers] Security function question



PureBytes Links

Trading Reference Links

I have Metastock 8.01 EOD version. I am trying to establish an 
indicator using the Security () function, but one which has some 
flexibility.

For example, say I have a folder which contains 26 stocks (symbols A 
through Z), and I want to create the following indicator, which uses 
ALL 26 stocks:

If(Security("A",C)>Ref(Security("A",C),-10),1,0)+
If(Security("B",C)>Ref(Security("B",C),-10),1,0)+
If(Security("C",C)>Ref(Security("C",C),-10),1,0)+
If(Security("D",C)>Ref(Security("D",C),-10),1,0)+
   etc. through "Z"

Now I know that I can substitute the actual symbols for "A", "B", etc. 
in all 26 formulas and create the indicator.

But every time that I want to change some of the stocks in the folder, 
I would have to manually change the requisite lines in the indicator.

Is there some way, when I want to use every stock in the folder (the 
order they are in the folder does not matter for my indicator), that I 
can set up the first line of the above in some fashion to indicate the 
folder, and then all of the subsequent lines would automatically 
select the "next" stock in the folder? In that way, I could change the 
stocks in the folder easily, and never have to rewrite the indicator.

Thanks for any help you can provide,

Harry


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/