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

Notification

Icon
Error

Options
Go to last post Go to first unread
Ben_Zurich  
#1 Posted : Friday, March 16, 2007 5:30:15 PM(UTC)
Ben_Zurich

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/4/2006(UTC)
Posts: 57
Location: Zurich, Switzerland

I have Excel functions to filter out tops and bottoms automatically:

=IF(MAX(D22:D40,D42:D61)-D41>0,0,D41)
=IF(MIN(E22:E40,E42:E61)-E41<0,0,E41)

I would like to code something like this in Metastock, but I would like to possibly adjust the days before and after the day which is being looked at as a parameter, if ever possible.

I know this is using forward-looking information, but is is to be used for validation, and not for trading purposes.

So what I want to do is to see wether each day has been the lowest price for the n days following and the n days preceding.

How could that be coded?


The goal is
to have an indicator displaying a "1" when the current Low is the lowest for n days before AND after the current day, and to display a "1" when the current high is the highest for n days before AND after the current day.

Any hints? Thanks in advance.







crash59  
#2 Posted : Saturday, March 17, 2007 5:00:25 PM(UTC)
crash59

Rank: Newbie

Groups: Registered, Registered Users
Joined: 12/19/2006(UTC)
Posts: 3

This should be a start in the right direction....

----------------------------------------------------------------

N:= 5;

H1:= Ref(H,-N) = HHV(H,2*N+1);

H2:= Ref(H1,N) ;

H2;

L1:= Ref(L,-N) = LLV(L,2*N+1);

L2:= Ref(L1,N) ;

L2;

----------------------------------------------------------------

Regards,

Crash

Ben_Zurich  
#3 Posted : Saturday, March 17, 2007 5:46:34 PM(UTC)
Ben_Zurich

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/4/2006(UTC)
Posts: 57
Location: Zurich, Switzerland

in fact, a very good start!
thank you so much!

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.