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

Notification

Icon
Error

Options
Go to last post Go to first unread
popcorn  
#1 Posted : Saturday, December 17, 2005 1:48:46 PM(UTC)
popcorn

Rank: Member

Groups: Registered, Registered Users
Joined: 12/17/2005(UTC)
Posts: 15

Hello everyone, I'm new to Metastock . This is my formula. A:=If(C>Ref(C,-1),V,0)+If(Ref(C,-1)>Ref(C,-2),V,0)+If(Ref(C,-2)>Ref(C,-3),V,0)+(If(C=Ref(C,-1),V,0)+If(Ref(C,-1)=Ref(C,-2),V,0)+If(Ref(C,-2)=Ref(C,-3),V,0))/2; B:=If(C<Ref(C,-1),V,0)+If(Ref(C,-1)<Ref(C,-2),V,0)+If(Ref(C,-2)<Ref(C,-3),V,0)+(If(C=Ref(C,-1),V,0)+If(Ref(C,-1)=Ref(C,-2),V,0)+If(Ref(C,-2)=Ref(C,-3),V,0))/2; Vr3:=If(b=0,Ref(vr3,-1),A/B); vr3; "Vr3:=If(b=0,Ref(vr3,-1),A/B)" have a math error. I want to get previous value, if b=0. Thanks for any help
wabbit  
#2 Posted : Saturday, December 17, 2005 2:17:48 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Try this.... A:=Sum(If(C>Ref(C,-1),V,0),3)+Sum(If(C=Ref(C,-1),V,0),3)/2; B:=Sum(If(C<Ref(C,-1),V,0),3)+Sum(If(C=Ref(C,-1),V,0),3)/2; If(B=0,PREV,A/Max(B,0.00001)) Hope this helps. wabbit :D [edited to improve readability!, then changed it back to the original!]
popcorn  
#3 Posted : Saturday, December 17, 2005 2:55:47 PM(UTC)
popcorn

Rank: Member

Groups: Registered, Registered Users
Joined: 12/17/2005(UTC)
Posts: 15

thanks in advance excel is correct UserPostedImage metastock, similar , but ..... UserPostedImage
StorkBite  
#4 Posted : Saturday, December 17, 2005 6:12:50 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
PC- What is the Excel formula you are using, and did you change your MS formula to Wabbits version?
popcorn  
#5 Posted : Sunday, December 18, 2005 1:26:01 PM(UTC)
popcorn

Rank: Member

Groups: Registered, Registered Users
Joined: 12/17/2005(UTC)
Posts: 15

:P my excel formula is wrong Wabbits version is correct . Thanks for reply and help :D
wabbit  
#6 Posted : Sunday, December 18, 2005 3:00:48 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
popcorn, Do you want to share the reasoning behind this indicator? and its derivation? wabbit :D
popcorn  
#7 Posted : Monday, December 19, 2005 3:53:15 AM(UTC)
popcorn

Rank: Member

Groups: Registered, Registered Users
Joined: 12/17/2005(UTC)
Posts: 15

A:=Sum(If(C>Ref(C,-1),V,0),3)+Sum(If(C=Ref(C,-1),V,0),3)/2; B:=Sum(If(C<Ref(C,-1),V,0),3)+Sum(If(C=Ref(C,-1),V,0),3)/2; If(B=0,PREV,A/Max(B,0.00001)) ^^^^^^^^^^^^^^^^^^^^^ Original code is A/B. I change the code to keep previous value if B=0. Sorry, my english is poor. I post a image . (Motorola Monthly) I hope you can understand what i mean. UserPostedImage
Users browsing this topic
Guest (Hidden)
Similar Topics
Expert formula problem with Metastock 16 (Error Messages)
by chrisdr22 6/14/2018 3:48:51 AM(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.