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

Re: [amibroker] Stepping backwards in loop



PureBytes Links

Trading Reference Links

Graham

Try (i=LastValue(..); i<bar; i--)   assuming last bar is the actual last
bar, not one selected in the middle of the sata set...

----- Original Message ----- 
From: "Graham" <gkavanagh@xxxxxxxxxxxxx>
To: "AB yahoo group" <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, September 22, 2003 5:58 PM
Subject: [amibroker] Stepping backwards in loop


> I have this formula in a loop but it steps through the values from the
> beginning of the data rather than from the end.
> I have tried reversing the line " for ( i=1; i < bar ; i++ ) " to  " for (
> i=bar; i > 0 ; i-- ) " but stills seems to check the bars in the forward
> direction.
> All I want to do is go back from the selected (or last) bar.
> Help appreciated.
>
> period = 3;
> Bar = SelectedValue(BarIndex());
> LastBar = LastValue(BarIndex());
> start = Lastbar-bar;
>
> LowerLow[0] = SelectedValue(L);
> for ( j=1; j<=period; j++ )
> {
>  for ( i=1; i < bar ; i++ )
>  {
>   if ( L[i] < LowerLow[j-1] )
>   {
>    LowerLow[j] = L[i];
>   }
>  }
> }
>
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
>
>
>
> 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/
>
>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Remanufactured Ink Cartridges & Refill Kits at MyInks.com for: HP $8-20. Epson $3-9, Canon $5-15, Lexmark $4-17. Free s/h over $50 (US & Canada).
http://www.c1tracking.com/l.asp?cid=6351
http://us.click.yahoo.com/0zJuRD/6CvGAA/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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/