That's the way to do it but you need to set AA.datefrom (check the docs on the correct property) and aa.dateTo before you do the optimize.
Plus your for statement needs more work. d > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of balin8425 > Sent: Thursday, February 21, 2008 3:34 AM > To: [email protected] > Subject: [amibroker] Re: Looping through DateRangeFrom and > DateRangeTo with JavaScript > > Correction: > > for ( DateRangeFrom=1,1,2000; DateRangeFrom=1,1,2006; Year + 1) > { > DateRangeTo=DateRangeFrom + 1 year; > AA.Optimize (0); > reportName=fileName; > AA.Export (reportName); > } > > > > --- In [email protected], "balin8425" <[EMAIL PROTECTED]> wrote: > > > > I think something like this would work if I knew how to code it > > correctly: > > > > //beginning code from previous post here... > > > > for ( DateRangeFrom=2000; DateRangeFrom=2006; Year + 1) > > for ( DateRangeTo=2001; DateRangeTo=2007; Year + 1) > > { > > AA.Optimize (0); // 0: portfolio 1: individual 2: old > > reportName=fileName; > > AA.Export (reportName); > > } > > > > > > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > > Yahoo! Groups Links > > > >
