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

Notification

Icon
Error

Options
Go to last post Go to first unread
perfecttip  
#1 Posted : Thursday, December 3, 2009 12:50:22 PM(UTC)
perfecttip

Rank: Member

Groups: Registered, Registered Users
Joined: 9/20/2009(UTC)
Posts: 15

{code}
tgt:=100;
a:=CCI(20)<-tgt;
b:=CCI(20)>tgt;
state:=If(a>b,-1,If(a=b,0,1));
state=1

the third line is not being displayed properly in the post. It reads a: CCI(20) less than (-)tgt; and the remaining part from b: appears in the next line.

Admin:Edited for clarity
johnl  
#2 Posted : Thursday, December 3, 2009 7:12:43 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

tgt:=100;
a:=CCI(20)<-tgt;
b:=CCI(20)>tgt;
state:=If(a>b,-1,If(a=b,0,1));
state=1

first state is 0 if CCI(20) is between -100 and 100 and -1 if CCI(20)<-100 and 1
if CCI((20)>100.
the second state says to select from the previous state only values = 1.

Why not:

a1:=100;
a2:=CCI(20);
a3:=If((a2<-a1),-1,If(a2>a1,1,0));
a3




Users browsing this topic
Guest (Hidden)
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.