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

Notification

Icon
Error

Options
Go to last post Go to first unread
Flexi  
#1 Posted : Thursday, July 12, 2012 3:04:00 AM(UTC)
Flexi

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
MS Support  
#2 Posted : Monday, August 20, 2012 4:39:21 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)
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.
Flexi  
#3 Posted : Tuesday, September 4, 2012 11:23:57 AM(UTC)
Flexi

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?
MS Support  
#4 Posted : Tuesday, September 4, 2012 11:49:30 AM(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)
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
Flexi  
#5 Posted : Tuesday, September 4, 2012 3:31:38 PM(UTC)
Flexi

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
Flexi  
#6 Posted : Wednesday, September 5, 2012 2:26:47 AM(UTC)
Flexi

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/27/2006(UTC)
Posts: 135

would you provide the code for the count?
MS Support  
#7 Posted : Tuesday, September 11, 2012 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)
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)
Similar Topics
Count of Break line (Basic Coding Techniques)
by sevenvironment 7/4/2023 8:24:31 AM(UTC)
Add counting date to the indicator (Formula Assistance)
by kkrishna79 4/4/2023 7:40:03 AM(UTC)
Attention: Delays Processing New Orders and Changes to Accounts (Product Alerts)
by MS Support 8/13/2022 1:50:39 AM(UTC)
Bars of year counter (Formula Assistance)
by fiorenzo 11/9/2020 1:49:59 PM(UTC)
Counting Closes (Formula Assistance)
by OrsonCarte 9/8/2020 4:49:11 PM(UTC)
Open a Pro account to get a 5% discount on commission (Basic Coding Techniques)
by Guest 6/17/2020 11:45:11 PM(UTC)
!! Attention- New MetaStock Customers - Delayed Account Entitlements !! (Product Alerts)
by MS Support 4/22/2020 1:19:20 PM(UTC)
How to secure Verizon Email Hacked Account? (Tips & Tricks)
by Guest 8/3/2019 9:26:35 AM(UTC)
Growing a small Account with Short-term Swing Trades - Rick Saddler - 1:00 PM (sessions)
by Greg 4/16/2019 11:03:21 PM(UTC)
How to Cancel/Refund SilverSingles Subscription Account ? (Forum Feedback)
by Guest 2/25/2019 5:08:20 PM(UTC)
count bars back (Formula Assistance)
by paolo1976 2/18/2019 12:57:44 PM(UTC)
Count backwards to find sum of specific days (Formula Assistance)
by vikas 7/21/2016 2:54:19 PM(UTC)
Count and reset after a specified period (Formula Assistance)
by vikas 7/19/2016 12:31:14 PM(UTC)
MSTT Product Discounts (3rd Party Advertisements)
by mstt 8/19/2015 12:01:40 AM(UTC)
Exploration formula - count of occurrences in X period (Formula Assistance)
by ShaneAUNZ 10/16/2014 8:46:28 PM(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.