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

Notification

Icon
Error

Options
Go to last post Go to first unread
louie7117  
#1 Posted : Sunday, May 16, 2021 8:40:53 PM(UTC)
louie7117

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. 

MS Support  
#2 Posted : Tuesday, May 18, 2021 2:20:05 PM(UTC)
MS Support

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 Go to Quoted Post

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)

thanks 1 user thanked MS Support for this useful post.
louie7117 on 5/18/2021(UTC)
louie7117  
#3 Posted : Tuesday, May 18, 2021 2:59:04 PM(UTC)
louie7117

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.
thanks 1 user thanked louie7117 for this useful post.
MS Support on 5/19/2021(UTC)
MS Support  
#4 Posted : Wednesday, May 19, 2021 3:22:55 PM(UTC)
MS Support

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 Go to Quoted Post
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)

thanks 1 user thanked MS Support for this useful post.
louie7117 on 5/19/2021(UTC)
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.