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

Re: CC_Counter indicator



PureBytes Links

Trading Reference Links

I have just joined the list and am a little behind the pack. I am trying
to learn EL and am interested in variations on a theme. I.e.,
accomplishing the same end result with different code.  In reading the
last 100 issues on this list I saw that the following could be coded
differently but with the same end result.  One advantage with the new
code is having different colors for the plots.

 
>>"J. Sallen" <pcourt@xxxxxxxxx>
>> This indicator counts consecutive closes up and down. Maybe someone can find a good use for it.  

>At Tue, 17 Nov 1998 12:14:09 -0700 Gary Fritz wrote

>Hi Jack,

>Actually it looks to me like your indicator plots a summation of the ups and downs in the last Len bars -- >right? I've also added an extra plot that does compute the consecutive number of ups/downs.  Notice this one >never has a value of zero, since it goes from "N down closes" to "1 up close" and vice versa.

>Vars: CCount(0);

>if (C > C[1]) then begin
  if (CCount > 0) 
    then CCount = CCount+1
    else CCount = 1;
  end
>else begin
  if (CCount < 0)
    then CCount = CCount-1
    else CCount = -1;
  end;

>plot2(CCount, "CC2");
>plot3(0, "");

var: cnt(0), cnt1(0);

if c>c[1] then begin
       cnt1=0;
       cnt=cnt +1;
end else begin
        cnt=0;
        cnt1=cnt1-1;
end;

plot1(cnt, "");
plot2

-Wayne