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

Re: [EquisMetaStock Group] Yesterdays High



PureBytes Links

Trading Reference Links

Quoteloader

There is a small problem with your chosen method of defining 'FirstBar' and
'LastBar'. Essentially you are using the same signal for both variables with
one delayed an extra day. The effect of this is that you are including one
extra bar of data to determine yesterdays high (the first bar of the current
day). Another issue that may affect you is that the previous days high will
not be adjusted until the first bar of the current day is available - not a
biggie but something to be aware of.

When I do a similar thing with weekly data on daily charts I define the
end-of-week as Friday but use DayofWeek()<=Ref(DayofWeek(),-1) as a backup
method in case the Friday was a holiday or no-trade day. Be registering
which method produced the end-of-week I can then make sure I get the weekly
time frame boundaries correct, and display the value on the earliest
possible bar.

Roy

> Since not all my data has bars for 9:31 and 4:10 i modified it to be
>
> {Yesterday's High}
> {define "FirstBar" and "LastBar" for day}
> FirstBar:=Ref(DayOfMonth(),-1)<>Ref(DayOfMonth(),-2);
> LastBar:=DayOfMonth()<>Ref(DayOfMonth(),-1);
> In:=Cum(1)=1;
> Hh:=ValueWhen(1,In OR LastBar,HighestSince(1,In OR FirstBar,H));
> Hh;
>
> I find this simple concept to be rather confusing...even though I am
> a programmer.
> Without your help I dont think I wouldve seen the solution
>
> Cheers,
> QuoteLoader
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
> wrote:
> > QuoteLoader
> >
> > Something like this should work once you define the first bar and
> last bar
> > of each day. The daily frame can be improved to make allowances for
> late
> > openings, early closes and the like but the chances are that this is
> > sufficient for your needs
> >
> > Roy
> >
> >   {Yesterday's High}
> >   {define "FirstBar" and "LastBar" for day}
> > FirstBar:=Minute()=30 AND Hour()=9;
> > LastBar:=Minute()=10 AND Hour()=16;
> > In:=Cum(1)=1;
> > Hh:=ValueWhen(1,In OR LastBar,HighestSince(1,In OR FirstBar,H));
> > Hh;
> >
> >
> >
> > ----- Original Message ----- 
> > From: "quoteloader" <quoteloader@xxxx>
> > To: <equismetastock@xxxxxxxxxxxxxxx>
> > Sent: Wednesday, June 04, 2003 8:25 AM
> > Subject: [EquisMetaStock Group] Yesterdays High
> >
> >
> > > Howdy,
> > >
> > > I'm trying to do what appears to be a relatively simple task...
> > > On an intraday chart (1 min bars) I would like to find Yesterdays
> High
> > > So this value would be constant throughout the day.
> > >
> > > Any help would be greatly appreciated,
> > >
> > > Regards
> > > QuoteLoader
> > >
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > equismetastock-unsubscribe@xxxxxxxxxxxxxxx
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> > >
>
>
>
> To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/