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

RE: [amibroker] endless loop?



PureBytes Links

Trading Reference Links

Thank you Herman …

 


From: Herman van den Bergen [mailto:psytek@xxxxxxxx]
Sent: Monday, January 24, 2005 5:01 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] endless loop?

 

Looks like the second loop should read: for(ii=3;ii>i;ii--)

 

herman

-----Original Message-----
From: blueinvestor [mailto:bluesinvestor@xxxxxxxxxxxxx]
Sent: Monday, January 24, 2005 4:57 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] endless loop?


I have been trying to come up with a solution but AB is telling me
that this is an endless loop:

for(i=0;i<3;i++)
{
Plot(sin(BarIndex()+Random()),"corr",i);
VarSet("x" + i,sin(BarIndex()+Random()));
}

for(i=1;i<3;i++)
{
      for(ii=3;ii>i;i--)
      {
            VarSet("c" + i + "-" + ii,Cross(i,ii) OR Cross(ii,i));
            AddColumn(VarGet("c" + i + "-" + ii),"c" + i + "-" + ii);
      }
AddColumn(VarGet("x" + i),"x" + i);
}

Filter=C>0;

I do not see where this would be an endless loop, anyone have any ideas?

Thanks,
Peter

--- In amibroker@xxxxxxxxxxxxxxx, "bluesinvestor" <bluesinvestor@xxxx>
wrote:
> Thank you Tomasz, very simple, elegant solution.
>
> My next question I pose for the group is this:
>
> for(i=0;i<10;i++)
> {
>       Plot(sin(BarIndex()+Random()),"corr",i);
> }
>
> In this **oversimplified** example there will be 10 lines plotted on the
> graph, how can I find out how many crossovers occurred on any particular
> day?  Does it have to be 'hard' coded or is there another 'simple,
elegant
> solution'?
>
> Thanks again,
> Peter
>
> > -----Original Message-----
> > From: Tomasz Janeczko [mailto:amibroker@xxxx]
> > Sent: Saturday, January 22, 2005 2:39 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: Re: [amibroker] Plot ALL tickers in a group
> >
> >
> > Hello,
> >
> > http://www.amibroker.com/f?categorygetsymbols
> >
> >  // retrive comma-separated list of symbols in watch list
> >    list = CategoryGetSymbols( categoryWatchlist, 1);
> >
> >
> >    for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
> >    {
> >       f = Foreign( sym, "C" );
> >       Plot( f, sym, colorRed + i );
> >    }
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "blueinvestor" <bluesinvestor@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Saturday, January 22, 2005 7:21 AM
> > Subject: [amibroker] Plot ALL tickers in a group
> >
> >
> > >
> > >
> > > I know this may sound silly, but I am looking to have overlapping
> > > charts from a group of tickers.
> > >
> > > What I would like to do is programatically plot them rather than
> > > 'hard' code each and every one.  Is there some way to iterate
through
> > > the ticker list in a group and plot them on a chart?
> > >
> > > Thanks in advance,
> > > Peter
> > >
> > >
> > >
> > >
> > >
> > >
> > > Check AmiBroker web page at:
> > > http://www.amibroker.com/
> > >
> > > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> >
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >





Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html




Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html






Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html




Yahoo! Groups Links