PureBytes Links
Trading Reference Links
|
This is a lot simpler:
---8<--------------------
i:=Mov(C,20,S);
YA:=BarsSince(i<Ref(i,-1));
YB:=BarsSince(i>Ref(i,-1));
YA;-YB
---8<--------------------
jose '-)
http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx,
"bellamy_29m" <bellamy_29m@xxx> wrote:
>
>> Could anyone assist me in writing an exploration that counts the
>> number of days an indicator has risen or fallen? I'd like to
>> include this in an Explorer that shows not only the value of a
>> given indicator, but also what direction it is heading and for how
>> long it has been heading in that direction.
>
>
> Well my take on the question is that mmbbrr79 is looking for the
> number of consecutive days the indicator has been on the rise/fall,
> not the total number in the chart?
>
> If this is the case:
>
> {Consecutive Rise/Fall}
> i:=Mov(C,20,S); {the indicator}
>
> A:=i>Ref(i,-1);
> B:=i<Ref(i,-1);
>
> XA:=Cum(A);
> XB:=Cum(B);
> YA:=XA-ValueWhen(1,B,XA);
> YB:=XB-ValueWhen(1,A,XB);
>
> {plot - histograms look nice}
> YA;-YB;
>
>
> Is this what you are looking for?
------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|