Error

 Previous Topic Next Topic
 louie7117 #1 Posted : Sunday, May 16, 2021 8:40:53 PM(UTC) Rank: NewbieGroups: Registered, Registered Users, SubscribersJoined: 11/11/2020(UTC)Posts: 3Location: NYThanks: 2 timesWas 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.
 Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.
 MS Support #2 Posted : Tuesday, May 18, 2021 2:20:05 PM(UTC) Rank: Advanced MemberGroups: Moderators, Registered, Registered Users, SubscribersJoined: 10/8/2010(UTC)Posts: 1,741Thanks: 66 timesWas thanked: 146 time(s) in 142 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. louie7117 on 5/18/2021(UTC)
 louie7117 #3 Posted : Tuesday, May 18, 2021 2:59:04 PM(UTC) Rank: NewbieGroups: Registered, Registered Users, SubscribersJoined: 11/11/2020(UTC)Posts: 3Location: NYThanks: 2 timesWas 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. MS Support on 5/19/2021(UTC)
 MS Support #4 Posted : Wednesday, May 19, 2021 3:22:55 PM(UTC) Rank: Advanced MemberGroups: Moderators, Registered, Registered Users, SubscribersJoined: 10/8/2010(UTC)Posts: 1,741Thanks: 66 timesWas thanked: 146 time(s) in 142 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. louie7117 on 5/19/2021(UTC)
 Users browsing this topic
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.