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

Notification

Icon
Error

Options
Go to last post Go to first unread
Talarico  
#1 Posted : Tuesday, December 13, 2005 8:23:47 AM(UTC)
Talarico

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 2/4/2005(UTC)
Posts: 8

With my explorations I would like to see a column comprising of the highest price for the last 52 weeks and another for the lowest price of the last 52 weeks. These are values that would be nice to see once my database of securities has been filtered upon completing an exploration. Any help again, would be greatly appreciated. Thank you.
Jose  
#2 Posted : Tuesday, December 13, 2005 9:44:03 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
There is more involved to 52-week highs & lows than a simple HHV(H,252) or LLV(L,252). Take a look at these 52-week high & 52-week low explorations for some ideas. jose '-)
Jose  
#3 Posted : Tuesday, December 13, 2005 10:37:05 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
...Or try this indicator: [code:1:7465deb2a6] MetaStock -> Tools -> Indicator Builder -> New -> Copy and paste formula below. ====================== 52-week true High/Lows ====================== ---8<------------------------------- { True 52-week Highs & Lows, signals - v2.0 } { ©Copyright 2004~2005 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } { User input } yr:=Input("Lookback Nr of years",1,100,1); plot:=Input("Year's Hi/Lo: [1]Values, [2]Signals, [3]Start",1,3,1); { Last available day/month/year } ToDay:=LastValue(DayOfMonth()); ToMnth:=LastValue(Month()); lastYear:=LastValue(Year())-yr; { 52-week period } 52week:=Year()>lastYear OR (Year()=lastYear AND (Month()>ToMnth OR Month()=ToMnth AND DayOfMonth()>=ToDay)); { 52-week signal } start:=52week AND Alert(52week=0,2); { 52-week Hi/Lo } init:=Cum(1)=1; hi:=If(52week,HighestSince(1,start OR init,H), C); lo:=If(52week,LowestSince(1,start OR init,L),C); { 52-week Hi/Lo signals } hiSignals:=H>Ref(hi,-1) AND 52week AND start=0; loSignals:=L<Ref(lo,-1) AND 52week AND start=0; { Plot in own window } If(plot=1,hi,If(plot=2,hiSignals,0)); If(plot=1,lo,If(plot=2,-loSignals,start)) ---8<------------------------------- [/code:1:7465deb2a6] jose '-)
thanks 1 user thanked Jose for this useful post.
Ujjwal on 7/16/2016(UTC)
Talarico  
#4 Posted : Wednesday, December 14, 2005 2:28:01 AM(UTC)
Talarico

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 2/4/2005(UTC)
Posts: 8

Thank you very much Jose. If it gets too rowdy in Sydney, you can always move down to Melbourne. Thanks again.
digbee  
#5 Posted : Wednesday, May 2, 2007 8:33:17 PM(UTC)
digbee

Rank: Member

Groups: Registered, Registered Users
Joined: 3/4/2006(UTC)
Posts: 16

Jose

I have a question about this function. In an exploration, I have added the 52 week high and 52 week low :

Col F - FmlVar("52-week true High/Lows","HI")

Col G - FmlVar("52-week true High/Lows","LO")

with things like close, high, low, vol in the other columns. What I found is that the 52 week function only goes back a few days to find the 52wk High and lows. If I add

Col H - Mov(C ,200 ,S )

then the 52wk High low calculates back to 200 days back.

How do I force this function to use 1 year of data ?

Dig

wabbit  
#6 Posted : Wednesday, May 2, 2007 9:33:28 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
In your explorer options, uncheck load minumum records and load at least 255 bars of data. As noone can accurately say how many trading days there are in a particular year, load 500 bars of data just be sure, the effect on the speed of the exploration will be minimal.


wabbit [:D]

digbee  
#7 Posted : Thursday, May 3, 2007 8:43:56 PM(UTC)
digbee

Rank: Member

Groups: Registered, Registered Users
Joined: 3/4/2006(UTC)
Posts: 16

Thank you Wabbit - I looked under options when I was editing the eploration, but not under options before running the exploration. I see all the data I want now,,,

Dig

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.