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

Re: [amibroker] Got a better way to code for increasing close? ( newbe question)


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] Got a better way to code for increasing close? ( newbe question)
  • From: "Anthony Faragasso" <ajf1111@xxxxxxxx>
  • Date: Sat, 2 Jul 2005 20:22:07 -0400

PureBytes Links

Trading Reference Links

You could try something like this:
 

Filter=1;

/***Current State of the Closes******/

stateUp=BarsSince(C < Ref(C,-1));

stateDown=BarsSince(C > Ref(C,-1));

AddColumn(stateUp,"currentUp");

AddColumn(statedown,"CurrentDown");

----- Original Message -----
Sent: Saturday, July 02, 2005 8:08 PM
Subject: [amibroker] Got a better way to code for increasing close? ( newbe question)

It seems to me there is something better than.

c0 = Ref(close,0);
c1 = Ref(close,-1);
c2 = Ref(close,-2);
c3 = Ref(close,-3);
c4 = Ref(close,-4);
c5 = Ref(close,-5);
c6 = Ref(close,-6);

t0 = iff( c0 > c1, 1,0);
t1 = iff( c1 > c2, 1,0);
t2 = iff( c2 > c3, 1,0);
t3 = iff( c3 > c4, 1,0);
t4 = iff( c4 > c5, 1,0);
t5 = iff( c5 > c6, 1,0);

daysup = t0 + t1 + t2 + t3 + t4 + t5;

Thanks,
Bob




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html




No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 6/30/2005


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS




No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 6/30/2005