Why did you not follow up the excellent lead by Graham. You don't
need to "count the days" by hand
the following code will give you what you want. You may just need to
reconfigure how windows shows dates on your computer. Mine
is "mm/dd/yyyy"
Try this
dt = DateTime();
Price1 = LastValue( ValueWhen(dt==StrToDateTime("12/05/2005"), C ) );
Price2 = LastValue( ValueWhen(dt==StrToDateTime("1/06/2006"), C ) );
Price3 = LastValue( ValueWhen(dt==StrToDateTime("2/07/2007"), C ) );
AddColumn(Price1 ,"Dec 5, 2005");
AddColumn(Price2 ,"Jan 6, 2006");
AddColumn(Price3 ,"Feb 7, 2007");
Filter =1;
--- In [email protected], "meenhal" <[EMAIL PROTECTED]> wrote:
>
>
> Thanks but Mr Graham's reply addressed the question to the point.
> Your solution will require counting the days first , furthermore
> this ref method deals with bars not days I suppose
>
>
> --- In [email protected], "Ara Kaloustian" <ara1@> wrote:
> >
> > Filter = Your criteria;
> > AddColumn(Close,...
> > AddColumn,Ref(Close,-x),"x days ago");
> > AddColumn(Ref(Close,-y),"y days ago");
> >
> > where x and y and offset in days
> >
> >
> > ----- Original Message -----
> > From: "meenhal" <meenhal@>
> > To: <[email protected]>
> > Sent: Thursday, July 10, 2008 10:37 PM
> > Subject: [amibroker] Re: How to do this................NO
RESPONSE
> SO
> > FAR..lemme try again
> >
> >
> > >
> > >
> > > So far no response
> > >
> > > To put it simply: can we get closing prices for two or more
> > > nonconsecutive days in the exploration window?
> > >
> > > --- In [email protected], "meenhal" <meenhal@> wrote:
> > >>
> > >> I need to list in the same analysis window closing prices of
all
> > >> shares trades on 3 differnt dates
> > >>
> > >> header for the window shouldlook like
> > >>
> > >> Ticker | Dec 5, 2005 | Jan 6, 2006 | Feb 7, 2007
> > >>
> > >> XYZ | 1.02 | 0.97 | 2.1
> > >>
> > >>
> > >>
> > >> How can I tell mibroker to give me closing prices on three
dates
> > > of
> > >> those scripts traded on those dates
> > >>
> > >> I have tried date conversions, barcount and barindex........can
> > > not do
> > >> it
> > >> Help please and Thanks in advance
> > >>
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > 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
> > >
> > >
> > >
> >
>