PureBytes Links
Trading Reference Links
|
There was a missing closing brace:
MaxLinReg = 0; // initialize
for( Counter = 13; Counter >= 7; Counter-- ) MaxLinReg = Max( MaxLinReg, LinearReg(close,Counter) );
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Tomasz Janeczko" <amibroker@xxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, May 04, 2004 10:50 PM
Subject: Re: [amibroker] Conditional looping question
> Hello,
>
> Very easily. You should just realize that the code searches for MAXIMUM value of linreg.
> So appropriate code is as follows
>
> MaxLinReg = 0; // initialize
> for( Counter = 13; Counter >= 7; Counter-- ) MaxLinReg = Max( MaxLinReg, LinearReg(close,Counter);
>
> TWO lines instead five lines in TS
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "graeme_oswin" <goswin@xxxxxxxxxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, May 04, 2004 3:32 PM
> Subject: [amibroker] Conditional looping question
>
>
> > Dear all,
> >
> > Is it possible to implement Conditional looping in AFL along the
> > lines of the following. For example what is the most effective way of
> > translating this Tradestation language example. ( I think.)
> >
> > snip ---------------------------------
> > For Counter = 13 downto 7 Begin
> > if linearregvalue(close,Counter,-1)>linearRegValue(Close,Period,-1)
> > then Period=Counter;
> > End;
> > Cord=linearregvalue(Close,Period,-1);
> > ---------------------------------
> >
> > >From what I read I can substitute the appropriate AFL keywords (eg:
> > linearregvalue = linearreg etc...
> >
> > But how do you implement a conditional loop using arrays? AFL "if"
> > command does not appear to operate on arrays only boolean values.
> >
> > I'm sure its possible but I'm programmably challenged.
> >
> > Regards,
> >
> > Graeme Oswin
> >
> >
> >
> > 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
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>
>
>
> 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
> Yahoo! Groups Links
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|