[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

Sorry Sdfar but I tested and It doesn't solve my problem.
 
I need something pretty close.
 
I need something like a flip flop for count pulses.
 
When C>ref(c,-1)  =>  "up" pulse
When C<ref(c,-1)  =>  "down" pulse
 
But when C=Ref(C,-1) it's critical 'cause i need to find the last change of state for count as a positive ou negative pulse.
 
 
In fact i need to know how many up/down pulses we have since the last change of state and i have one more problem, i have just "Column F" remaining.
 
 
any help will be valuable.
 
 
Thanks in advance
 
 
Att,
 
MORMAX
 
 
 
 
 
----- Original Message -----
From: Safdar
Sent: Wednesday, January 11, 2006 4:26 PM
Subject: Re: [EquisMetaStock Group] counting positive and negative bars.

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




Attachment: imagem.PNG
Description: PNG image