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 : 20 years ago
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 : 20 years ago
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 : 20 years ago
henry1224

Rank: Advanced Member

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

Was thanked: 3 time(s) in 3 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 2 years ago
Counting Closes (Formula Assistance)
by OrsonCarte 4 years ago
Bar counting (Basic Coding Techniques)
by Flexi 11 years ago
Counting bars to locate Fib and Lucas numbers. (Formula Assistance)
by singhvi 13 years ago
counting reset (MetaStock)
by Flexi 13 years ago
Counting days above a moving average (Formula Assistance)
by dexter 14 years ago
Counting bars (Basic Coding Techniques)
by Flexi 14 years ago
Counting of days (MetaStock)
by DonVinci 16 years ago
CODING COUNTING FOR DEMARKS COMBO OR SEQUENTIAL WITH ALERTS, & SYMBOLS,ETC (Formula Assistance)
by shadmax 17 years ago
Counting consecutive bars [RESOLVED] (Formula Assistance)
by ferrdav 19 years ago
Counting bars dilemma [RESOLVED] (Formula Assistance)
by Perigon 19 years ago
Mark-to-market accounting [RESOLVED] (General Chat)
by StorkBite 19 years ago
Counting bars of previous events without using lastvalue (MetaStock)
by weird 19 years ago
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.

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