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 : 13 years ago
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 : 13 years ago
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,973

Thanks: 95 times
Was thanked: 158 time(s) in 153 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 : 13 years ago
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 : 13 years ago
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,973

Thanks: 95 times
Was thanked: 158 time(s) in 153 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 : 13 years ago
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 : 13 years ago
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 : 13 years ago
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,973

Thanks: 95 times
Was thanked: 158 time(s) in 153 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 2 years ago
Add counting date to the indicator (Formula Assistance)
by kkrishna79 2 years ago
Attention: Delays Processing New Orders and Changes to Accounts (Product Alerts)
by MS Support 3 years ago
Bars of year counter (Formula Assistance)
by fiorenzo 4 years ago
Counting Closes (Formula Assistance)
by OrsonCarte 5 years ago
Open a Pro account to get a 5% discount on commission (Basic Coding Techniques)
by Guest 5 years ago
!! Attention- New MetaStock Customers - Delayed Account Entitlements !! (Product Alerts)
by MS Support 5 years ago
How to secure Verizon Email Hacked Account? (Tips & Tricks)
by Guest 6 years ago
Growing a small Account with Short-term Swing Trades - Rick Saddler - 1:00 PM (sessions)
by Greg 6 years ago
How to Cancel/Refund SilverSingles Subscription Account ? (Forum Feedback)
by Guest 6 years ago
count bars back (Formula Assistance)
by paolo1976 6 years ago
Count backwards to find sum of specific days (Formula Assistance)
by vikas 9 years ago
Count and reset after a specified period (Formula Assistance)
by vikas 9 years ago
MSTT Product Discounts (3rd Party Advertisements)
by mstt 10 years ago
Exploration formula - count of occurrences in X period (Formula Assistance)
by ShaneAUNZ 10 years ago
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.

information You have 1 unread message(s) in your Inbox.