PureBytes Links
Trading Reference Links
|
The values of datenum and timenum refer to the bar values, so you must
write the code to allow for the bar in which the time you want resides
eg
I also changed the time to 10:09:00 am, 1009 refers to 10 minutes
9seconds after midnight
index = ValueWhen(DateNum()==1070829 AND TimeNum()>=100900 and
ref(TimeNum(),-1)<100900, BarIndex());
a fuller set of conditions to allow for checking the first bar time of
the day is
index = ValueWhen(
( DateNum()==1070829 AND TimeNum()>=100900 and ref(TimeNum(),-1)<100900 ) or
( DateNum()==1070829 and ref(DateNum(),-1)<1070829 AND TimeNum()>=100900 ),
BarIndex());
--
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com
On 30/08/2007, murthysuresh <money@xxxxxxxxxxxxxx> wrote:
> Here is my sample. It returns a EMPTY.
>
> index=ValueWhen(DateNum() == 1070829 AND TimeNum() == 1009, BarIndex
> ());
> printf(WriteVal(index));
>
> index returns EMPTY.
> however on my 1 minute chart, the barindex @ 10:09 for CFFN symbol
> is 32234
>
> Regards
>
> Seede
> --- In amibroker@xxxxxxxxxxxxxxx, Fred Tonetti <ftonetti@xxx> wrote:
> >
> > So .
> >
> >
> >
> > ValueWhen(DateNum() == 1070303 AND TimeNum() == 2302, BarIndex());
> >
> >
> >
> > _____
> >
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> On Behalf
> > Of murthysuresh
> > Sent: Wednesday, August 29, 2007 7:39 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: bar index with datenumber and time number
> >
> >
> >
> > only the datenumber works standalone and it marks end of day close.
> i
> > am looking for both date and time. for eg 3 march 2007 11:02 pm. i
> > have both the datenum and timenum and want to plot at that time.
> >
> > --- In amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com>
> ps.com,
> > "wavemechanic" <fimdot@> wrote:
> > >
> > > I've never tried it, but wouldn't valuewhen(datenumber == ...,
> > barindex()) work?
> > >
> > >
> > > ----- Original Message -----
> > > From: "murthysuresh" <money@>
> > > To: <amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com>
> ps.com>
> > > Sent: Wednesday, August 29, 2007 6:44 PM
> > > Subject: [amibroker] bar index with datenumber and time number
> > >
> > >
> > > > hello
> > > > my earlier post is missing. how do i find the barindex when i
> > have a
> > > > datenumber and timenumber.
> > > > i want to use plottext but i have only the datenumber and
> > timenumber
> > > > and it needs the value of x to continue further.
> > > >
> > > > thanks
> > > >
> > > > Seede
> > > >
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
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|