Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Quote:A:=Ref(HHV(H,255),-1)
Why use Ref(data, periods) with this formula? Wouldn't this exclude the current day's high from the exploration? Couldn't it just be A:=HHV(H,255)?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
The reason I use a Ref function when using the HHV or LLV functions is to find out when the high or low crosses the extreme function.
If you use just the HHV or LLV functions, a high or low can equal the extreme function and it will then recalculate and give false results
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Hi Henry-
Like if there were multiple times the high (or low) was exactly the same in a given period? That would give false results? If I'm missing your point, would you please give me an example?
Thanks for your time.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
A:=H>HHV(H,10);
B:=L<LLV(L,10);
D:=If(A,1,If(B,-1,0));
A1:=H>Ref(HHV(H,10),-1);
B1:=L<Ref(LLV(L,10),-1);
D1:=If(A1,2,If(B1,-2,0));
D;D1;
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
Henry why couldn't you write the formula like this :
A:=H=HHV(H,10);
B:=L=LLV(L,10);
D:=If(A,1,If(B,-1,0));
D
When you write this :
A1:=H>Ref(HHV(H,10),-1);
B1:=L<Ref(LLV(L,10),-1);
D1:=If(A1,2,If(B1,-2,0));
D1
I think you are using the last 11 periods because of the ref ...
Patrick :mrgreen:
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
when using this H=HHV(H,10)
vs
H>Ref(HHV(H,10),-1)
I use the later, the reason is that in sideways markets, a high can equal the HHV and then Retrace back,
I look for breakouts which just occur
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Is Ref(HHV(H,10),-1) the same as HHV(Ref(H,-1),10)? I ran a test on 1000+ securities and didn't see a difference. The latter reference is in the Primer.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
Ref(HHV(H,10),-1) the same as HHV(Ref(H,-1),10)?
A:=Ref(HHV(H,10),-1);
B:=HHV(Ref(H,-1),10);
A;B;
When Plotted , it should only be one line all the way through!
If there are 2 lines anywhere, then the formulas are different
BUMP!!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Ok... thanks for sticking with me, Henry. Really. :D
I'm trying to get the most out of your posts.... afterall, you are essentially the formula guru on the forums! I have to start with a good foundation so I'm looking at your 52 week formula. Questions come to mind... you know?? I am looking in other places too for the simple answers. Sometimes I just need reassurance! :oops:
Creating the plot is cleaver. I was just looking at numbers before. I tested several charts- on all of them my plot was a single line. This confirms my exploration results earlier. I don't see any difference.
Now I can also add plotting to my bag of tricks when comparing formulas. Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
I found that when I used the HHV function in certain conditions, that the indicator would equal the hhv for a few days, then breakout into new highs, but when I used the Ref function for the HHV the indicator would then breakout earlier,
I guess that you have to test the indicator to get the results that you are after!
My formulas are written in my style, everybody has their own ideas as to how to implement the functions.
Some coders feel that the secret is in the precise math that they use, but in reallity, keep it simple.
Walter Bressert says that there are 7 ways to get a signal from one indicator!
|
|
|
|
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.