Error

 Previous Topic Next Topic
 gargygargy #1 Posted : Saturday, April 30, 2022 3:36:25 PM(UTC) Rank: NewbieGroups: Registered, Registered Users, SubscribersJoined: 11/20/2020(UTC)Posts: 1 Hello, I'm looking to create a formula that recognizes if the stock is in consolidation. The consolidation length may be from 2 months to 36 months, and the difference between the low level of the consolidation and the high level of the consolidation should be maximum 20%. The price should be withing the consolidation range no less than 80% of the time. Is there a way to do it? Thank you
 Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.
 MS Support #2 Posted : Monday, May 2, 2022 4:08:59 PM(UTC) Rank: Advanced MemberGroups: Moderators, Registered, Registered Users, SubscribersJoined: 10/8/2010(UTC)Posts: 1,803Thanks: 71 timesWas thanked: 147 time(s) in 143 post(s) Originally Posted by: gargygargy Hello, I'm looking to create a formula that recognizes if the stock is in consolidation. The consolidation length may be from 2 months to 36 months, and the difference between the low level of the consolidation and the high level of the consolidation should be maximum 20%. The price should be withing the consolidation range no less than 80% of the time. Is there a way to do it? Thank you Hello,I believe this should be possible. You can try the following formula to see if it meets your criteria. If not, and you don't get any other responses here you may wish to try our formulas team to see if they can help via https://www.metastock.com/customer/resources/formulas/customformulaform.aspxThe following formula allows you to input a consolidation length (using a Daily data range of 60 periods to 1080 periods to estimate 2 to 36 months, you could lower these values if you only want to consider trading days). It then compares the Low price to the Highest High Value of the High price over this consolidation length looking for the Low price to be within 20% of the High. It then Sums up this conditional criteria, looking for the condition to be true at least 80% of the time.Code:``````X:=Input("Enter Consolidation Length",60,1080,60); Y:=L / HHV(H,X) >= 0.8; Sum(Y,X) / X >= 0.8`````` Edited by user Monday, May 2, 2022 4:14:32 PM(UTC)  | Reason: Not specified
 Users browsing this topic
 Similar Topics Consolidation Formula (Formula Assistance) by sisenberg 3/9/2017 5:52:14 PM(UTC) Consolidation zone indicator (Formula Assistance) by TraderWeb 2/2/2012 5:35:24 PM(UTC) consolidation detector (Formula Assistance) by garp 11/1/2009 7:37:43 AM(UTC) Consolidation Breakout (Advanced Coding Techniques) by adl 6/12/2006 9:26:13 AM(UTC)
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.