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

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
edwin4400  
#21 Posted : Saturday, June 25, 2005 3:47:00 PM(UTC)
edwin4400

Rank: Member

Groups: Registered, Registered Users
Joined: 6/22/2005(UTC)
Posts: 29
Location: Singapore

Thanks, Patrick. Your code works! Way to go, learning every single day. I came up with another way to code it. C1:=(O<=Ref(H,-1) AND O>=Ref(C,-1)); C2:=Cum(If(C1,Fml("Open-Close"),0)); C2
Patrick  
#22 Posted : Saturday, June 25, 2005 3:58:00 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Your way is much better :wink: Glad you got what you wanted :D
henry1224  
#23 Posted : Saturday, June 25, 2005 4:06:26 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
B:=If(O-C<0,C-O,0); C1:=(O<=Ref(H,-1) AND O>=Ref(C,-1)); C2:=Cum(If(C1,B,0)); C2 will give the sum of + closes above the open when your condition is true your version will give the total of O-C when your condition is true , O-C on a day where the C>O will give a - number O-C on a day where the C<O will give a + number
Users browsing this topic
Guest (Hidden)
Similar Topics
Add counting date to the indicator (Formula Assistance)
by kkrishna79 4/4/2023 7:40:03 AM(UTC)
Counting Closes (Formula Assistance)
by OrsonCarte 9/8/2020 4:49:11 PM(UTC)
Bar counting (Basic Coding Techniques)
by Flexi 8/1/2014 1:18:19 PM(UTC)
Counting bars to locate Fib and Lucas numbers. (Formula Assistance)
by singhvi 7/1/2012 3:19:58 AM(UTC)
counting reset (MetaStock)
by Flexi 1/30/2012 11:32:13 AM(UTC)
Counting days above a moving average (Formula Assistance)
by dexter 12/1/2010 6:20:50 AM(UTC)
Counting bars (Basic Coding Techniques)
by Flexi 9/27/2010 10:34:55 PM(UTC)
Counting of days (MetaStock)
by DonVinci 9/16/2008 2:58:42 AM(UTC)
CODING COUNTING FOR DEMARKS COMBO OR SEQUENTIAL WITH ALERTS, & SYMBOLS,ETC (Formula Assistance)
by shadmax 3/25/2008 7:42:16 PM(UTC)
Counting consecutive bars [RESOLVED] (Formula Assistance)
by ferrdav 7/7/2006 6:54:19 PM(UTC)
Counting bars dilemma [RESOLVED] (Formula Assistance)
by Perigon 6/5/2006 8:34:52 AM(UTC)
Mark-to-market accounting [RESOLVED] (General Chat)
by StorkBite 2/15/2006 8:21:31 AM(UTC)
Counting bars of previous events without using lastvalue (MetaStock)
by weird 2/4/2006 9:17:15 AM(UTC)
2 Pages<12
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.