PureBytes Links
Trading Reference Links
|
thanks for the code...
wouldnt the sumchange in the curly brackets be written as follows.
SumChange = IIF( Change > 0, 1,
> IIF( Change < 0, -1, 0 ) )+sumchange;
--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
wrote:
> Hello,
>
> Using most latest betas (4.31.x or higher) you can use this code:
>
> SumChange = 0;
> for( lookback = 16; lookback <= 20; lookback++ )
> {
> Change = Close - Ref( Close, -lookback );
>
>
> }
>
>
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "Eugene" <johngalt1234@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Monday, April 21, 2003 6:04 PM
> Subject: [amibroker] Is there an easier way?
>
>
> > I am working with a mutual fund and am trying the following:
> >
> > iif(close>ref(c,-16),1,iif(c=ref(c,-16),0,-1))
> >
> > am comparing the close today to the close 16 days earlier and
> > assigning a +1 if it is greater, 0 if it is equal and -1 if it is
lower.
> >
> > I want to compare todays price with the price 16,17,18,19 and 20 days
> > earlier. and repeat the same with prices for the preceeding 5 days.
> > and sum all the values obtained.
> >
> > Not being a programmer, I see that I have to write a lot of lines. Is
> > there a simpler way?
> >
> > TIA
> >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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/
> >
> >
> >
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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/
|