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

RE: [amibroker] Re: Looking for Lower Lows (resent with title)



PureBytes Links

Trading Reference Links

Thanks I have been pulling my hair out trying to see whaere I went wrong.
That at least got some answers that were not zero
It also highlighted an error in my original logic, I thought to go backwards
I would have to start [i] as barcount and go back to 1, but got that wrong.
Here is my revised code. It now works how I wanted it, now to apply to the
overall system


lowerlow[0] = LastValue(L);
for ( j=1; j<=3; j++ )
{
 for ( i=1; i <BarCount- 1 ; i++ ) //<<changed gk
 {
  if ( L[i] < lowerLow[j-1] ) 
  {
   lowerLow[j] = L[i];
  }
 }
 Filter = 1;
 AddColumn(Lowerlow[j]," ",1.3);  //<<change gk
}

Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia


-----Original Message-----
From: Phsst [mailto:phsst@xxxxxxxxx] 
Sent: Friday, 12 September 2003 9:30 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Looking for Lower Lows (resent with title)


Graham,

Try:
lowerlow[0] = LastValue(L);
for ( j=1; j<=3; j++ )
{
  for ( i=BarCount-1; i > 1 ; i-- )
  {
    if ( L[i] < lowerLow[j-1] )   //  <---- CHANGED
    {
       lowerLow[j] = L[i];
    }
  }
}
Filter = 1;
for (x=0;x<=3;x++)
{
  AddColumn(Lowerlow[x]," ",6.4);
}

Regards,

Phsst
--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> 
> I want to find the lower low according to its count back from the
last bar I
> tried this routine, but all I get is zero for lowerlow Can someone
help me,
> TIA
> 
> lowerlow[0] = LastValue(L);
> for ( j=1; j<=3; j++ )
> {
>  for ( i=BarCount-1; i > 1 ; i-- )
>  {
>   if ( L[i] < lowerLow[j] )
>   {
>    lowerLow[j] = L[i];
>   }
>  }
> }
> 
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
> 
> 
> ------------------------ 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/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
> ---------------------------------------------------------------------~
> ->
> 
> 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 ---------------------~--> 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/l.m7sD/LIdGAA/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/ 


------------------------ 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/l.m7sD/LIdGAA/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/