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

Notification

Icon
Error

Options
Go to last post Go to first unread
mozillan  
#1 Posted : Friday, March 16, 2007 9:11:41 AM(UTC)
mozillan

Rank: Member

Groups: Registered, Registered Users
Joined: 2/23/2007(UTC)
Posts: 26

Dear All,

I am trying to create an exploration with the following rules:

1. The trend can only be up or down.

2. The trend is up when today's close is higher than the highest high of the previous 5 periods.

3. The trend is down when today's close is lower than the lowest low of the previous 5 periods.

I tried something like this:

ColA:Up:- C>((HHV(H,5));

ColB:Down:- C<((LLV(L,5));

Filter: colA or colB

Needless to say, it doesn't work. AAA (Any And All) help appreciated.

mozillan  
#2 Posted : Friday, March 16, 2007 9:25:44 AM(UTC)
mozillan

Rank: Member

Groups: Registered, Registered Users
Joined: 2/23/2007(UTC)
Posts: 26

Update:

I tried this:

C > Ref(HHV(High,5),-1)

C< Ref(LLV(Low,5),-1)

It seems to work, but is it the correct syntax, correct way, accurate?

henry1224  
#3 Posted : Friday, March 16, 2007 12:17:48 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 3 time(s) in 3 post(s)

A:=If(C > Ref(HHV(High,5),-1),1,If(C< Ref(LLV(Low,5),-1),-1,0));

A;

this will plot 1 when the c is greater than the Highest 5 Highs and -1 when the low is less than the lowest 5 Lows, else it will plot a 0

A:=If(C > Ref(HHV(High,5),-1),1,If(C< Ref(LLV(Low,5),-1),-1,Prev));

A;

this will plot +1 or -1 till the condition reverses

mozillan  
#4 Posted : Saturday, March 17, 2007 2:43:07 PM(UTC)
mozillan

Rank: Member

Groups: Registered, Registered Users
Joined: 2/23/2007(UTC)
Posts: 26

Thanks for your help. Will try these and tell you about the results.
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.