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

Re: [amibroker] Is there an easier way to do this?



PureBytes Links

Trading Reference Links

Hello,

Chg = ROC( Close, 25 )/ABS( ROC( Close, 25 ) ); // this gives +1, 0, -1 depending on change direction;

mysum = Sum( Chg, 5 );


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "epintoem" <epintoem@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, October 14, 2002 1:46 PM
Subject: [amibroker] Is there an easier way to do this?


> I am looking to do the following
> 
> Compare todays close to the close say 25 days earlier, if less than
> then assign a value of -1, equal to then 0, and if greater than +1.
> I want to repeat that for days 26,27,28,29 and 30
> 
> then I wish to go to the previous 5 days and repeat the above and sum
> up all their values..
> 
> any help will be appreciated.
> 
> 
> 
> 
> 
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> 
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>