[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] counting positive and negative bars.



PureBytes Links

Trading Reference Links

This is Mr Roy Larson's code.
 
 
cola
A:=C<Ref(C,-1); {count signal}
B:=C>=Ref(C,-1);{reset signal}
X:=Cum(A); {bar count}
X-ValueWhen(1,B,X);(This will find consicutive falling bars}
 
colb
A:=C<Ref(C,-1);
B:=C>=Ref(C,-1);
X:=Cum(A);
X:=LastValue(Max(1,X-ValueWhen(1,B,X)));
Min(0,ROC(C,X,%));
{This will find %change through eintire move}
 
colc
A:=C>Ref(C,-1);
B:=C<=Ref(C,-1);
X:=Cum(A);
X-ValueWhen(1,B,X);
{This will find consicutive up bars }
 
cold
A:=C>Ref(C,-1);
B:=C<=Ref(C,-1);
X:=Cum(A);
X:=LastValue(Max(1,X-ValueWhen(1,B,X)));
Max(0,ROC(C,X,%));
{This will find %change through eintire move}
 
Safdar
----- Original Message -----
From: Mormax
Sent: Wednesday, January 11, 2006 9:58 PM
Subject: [EquisMetaStock Group] counting positive and negative bars.

 
 
How do I count the last consecutive rising and falling bars ?
 
 
Thanks in advance.
 
MORMAX


YAHOO! GROUPS LINKS