logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
MAkleung  
#1 Posted : Friday, November 13, 2009 8:27:58 AM(UTC)
MAkleung

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/7/2009(UTC)
Posts: 6

Dose any one know how to write a formula to scan for stock make 52 week high/low ? In addition, where I could find book about how to write Metastock code. I have experience in visual basic and easy language. Thanks for all your help Mak
johnl  
#2 Posted : Saturday, November 14, 2009 7:23:44 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602


Off the top of my head I would try:

a1:=HHV(C,52);
a2:=HHV(C,3);
a3:=If((a2=a1,1,,0);
a3

set options to run over weekly data.

a3 should be all stocks where the high of C over the last 52 weeks happened during the
last 3 weeks. Change parms as desired.

To learn formula language, download and modify existing code, you should pick it up
pretty quick.

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.