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

[amibroker] endless loop?



PureBytes Links

Trading Reference Links


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@x...]
> > 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
> > 
> > 
> > 
> > 
> > 
> > 
> >





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

<*> 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/