Error

 Previous Topic Next Topic
 dimpledbrain #1 Posted : Monday, May 23, 2022 12:47:23 AM(UTC) Rank: MemberGroups: Registered, Registered Users, SubscribersJoined: 9/7/2013(UTC)Posts: 17Thanks: 5 times hi all,need some quick guide to help on the above, basically where i want to say Line A is above/below Line B for x number of days in a row.Initially i thought of highest high value/ LLV, max, min, but it seems like it is just taking 1 point on Line A to compare with 1 point on Line BAlternatively i could write it repeatedly as follows:mov(c,5,%)>mov(c,25,%)mov(ref(c-1),5,%)>mov(ref(c-1,5),25,%)mov(ref(c-2),5,%)>mov(ref(c-2,5),25,%) mov(ref(c-3),5,%)>mov(ref(c-3,5),25,%) and so on....Any idea how to shorten the above. What is the formula language to use? Scanned through the user manual but couldnt locate itThank you.
 Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.
 MS Support #2 Posted : Monday, May 23, 2022 4:31:01 PM(UTC) Rank: Advanced MemberGroups: Moderators, Registered, Registered Users, SubscribersJoined: 10/8/2010(UTC)Posts: 1,842Thanks: 79 timesWas thanked: 148 time(s) in 144 post(s) Originally Posted by: dimpledbrain hi all,need some quick guide to help on the above, basically where i want to say Line A is above/below Line B for x number of days in a row.Initially i thought of highest high value/ LLV, max, min, but it seems like it is just taking 1 point on Line A to compare with 1 point on Line BAlternatively i could write it repeatedly as follows:mov(c,5,%)>mov(c,25,%)mov(ref(c-1),5,%)>mov(ref(c-1,5),25,%)mov(ref(c-2),5,%)>mov(ref(c-2,5),25,%) mov(ref(c-3),5,%)>mov(ref(c-3,5),25,%) and so on....Any idea how to shorten the above. What is the formula language to use? Scanned through the user manual but couldnt locate itThank you.  Hi,You might want to see if the Sum function fits your needs in this respect.If you wrap Sum around a conditional statement it will return the number of times that condition was true over X periods. You can also make the Sum a conditional statement by requiring that the result has to equal the X periods value. For example: Code:``````X:=4; Sum(Mov(C,5,E)>Mov(C,25,E),X)=X`````` You don't have to use a Variable of course, although this can make it easier to Edit the formula for different values, and you could also use it with the Input function to make the indicator more customizable without having to Edit the formula every time.Code:``````X:=Input("True Periods for Condition",1,999,4); Sum(Mov(C,5,E)>Mov(C,25,E),X)=X`````` 1 user thanked MS Support for this useful post. dimpledbrain on 5/24/2022(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.