Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
how get a count bar when stoch FIRST fall below 20 to cross above 60? use the barsince but the count reset to zero on the second or third refall below 20
|
|
|
|
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)
|
try this:
barssince( lowest(Stoch(5,3)) > 20)
As long as it was above 20 at the beginning of the chart, the formula will work.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
How to count the number of crossing below 20 before crossing above 60?
|
|
|
|
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)
|
use cum to count all the crossings below 20 then use value when to get the number of crossing when it fell below 60 and subtract that number from the number of crossing as it moves above 60
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
but want to reset the count to zero when cross above 60 and recount cross below 20
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/27/2006(UTC) Posts: 135
|
would you provide the code for the count?
|
|
|
|
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)
|
for that I would suggest a logical switch variation: Code:
start:= condition that starts the count
stop:= condition that stops the counting
count:= if(prev=0, if(start, 1, 0), if(stop, 0, prev))
count
|
|
|
|
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.