Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 11/11/2020(UTC) Posts: 3 Location: NY
Thanks: 2 times Was thanked: 1 time(s) in 1 post(s)
|
Looking to see if anyone can help with an exploration that looks for a breakout where today's close is greater than the close of the past 60 days and today's range is greater than the past 10 days. Appreciate any help out there.
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
Originally Posted by: louie7117 Looking to see if anyone can help with an exploration that looks for a breakout where today's close is greater than the close of the past 60 days and today's range is greater than the past 10 days. Appreciate any help out there.
Assuming you mean High minus Low for Range, compared to each day's High-Low for the last 10 days, you could use the HHV function with something like this: Code:C = HHV(C,60) AND (H-L)=HHV((H-L),10)
|
1 user thanked MS Support for this useful post.
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 11/11/2020(UTC) Posts: 3 Location: NY
Thanks: 2 times Was thanked: 1 time(s) in 1 post(s)
|
Thank you. Yes, assuming that H - L for the range is correct. Would the second part be Greater Than instead of Equal if we are looking for the Close to be bigger than the past 10 days? Appreciate it.
|
1 user thanked louie7117 for this useful post.
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
Originally Posted by: louie7117 Thank you. Yes, assuming that H - L for the range is correct. Would the second part be Greater Than instead of Equal if we are looking for the Close to be bigger than the past 10 days? Appreciate it.
Hello and sorry about that! You are correct and we should write that a bit differently. The HHV function includes the current bar, so we should add the REF function to shift the comparison back 1 bar. Additionally, we should use > otherwise it will only identify when the current value equals previous HHV values.
Code:C > Ref(HHV(C,60),-1) AND (H-L) > Ref(HHV((H-L),10),-1)
|
1 user thanked MS Support for this useful post.
|
|
|
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.