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

Re: Multiple time frames



PureBytes Links

Trading Reference Links

yes, in weekly data , the close is the last close of the last day of 
the week and the open the open of the first day of the week, and 
sometimes there is no monday or no friday in the trading week.
we know the end of the week when B<ref(B,-1)
where B= B=DayOfWeek();
so the close of the week is ref(close,-1).

for open we know the end of the week when B<ref(B,-1),
BUT when B<ref(B,-1) gives a spike it is the first day of the next 
week.
valuewhen(B>ref(B,-1),I want the open of the first day of the week 
and it was valuewhen(B<ref(B,-1),open,2))

Ow=ValueWhen(B<Ref(B,-1),
ValueWhen(B<Ref(B,-1),Open,2));

stephane

> 
> after looking at your code, where or how does Hw and Lw come into 
the
> formula, You seem to be ploting the close and the value of Cw ( 
which
> seems to be the value of the( close , -1) , when B < ref (b,-1).
> 
> Thank you
> Anthony
> 
> nenapacwanfr wrote:
> 
> > HI,
> > Do you think this could do the job
> >
> > steph
> >
> > /***Weekly Bars***/
> > B=DayOfWeek();
> > G=BarsSince(B<Ref(B,-1));
> >
> > Hw=ValueWhen(B<Ref(B,-1),HHV(Ref(H,-1) ,Ref(G,-1)+1));
> > Lw=ValueWhen(B<Ref(B,-1),LLV(Ref(L,-1) ,Ref(G,-1)+1));
> > Cw=ValueWhen(B<Ref(B,-1),Ref(Close,-1));
> >
> > Graph0=Close;
> > Graph0Color=1 ;
> > Graph0Style=64;
> >
> > Graph1=CW;
> > Graph1Color= 5 ;
> > Graph1Style=1;
> >
> >
> > I am currently working with some code with the WEEKDAY function to
> > > determine the previous week start and end and proceed from 
there.
> > > Thanks for the code though. Will come in handy for sure.
> > >
> >
> >
> >
> > Yahoo! Groups Sponsor
> ADVERTISEMENT
> 
> 
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.