--- In [email protected], Graham <[EMAIL PROTECTED]> wrote:
>
> Because the Friday may not always be the last market day of the
week, Use
> for the end of the week
> EndOfWeek = dayofweek()>ref(dayofweek(),1);
> It works. Thanks all.
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
>
> On 05/11/06, Keith McCombs <[EMAIL PROTECTED]> wrote:
> >
> > What if Xmax and NY fall on Friday?
> >
> > Terry wrote:
> >
> > You'll have to use the DayOfWeek function.
> >
> > DayOfWeek() == 5 on Friday which would translate too this assuming the
> > code otherwise works:
> >
> >
> >
> > EndOfWeek = DayOfWeek() == 5; //New line of code defining the end
of the
> > week
> >
> > Hi1 = IIf(EndOfWeek, Ref(HighestSince(EndOfWeek),H,1), 0);
> >
> >
> >
> > You can translate the rest of the code the same way.
> >
> > --
> >
> > Terry
> >
> > -----Original Message-----
> > *From:* [email protected]
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *amon_gizeh
> > *Sent:* Saturday, November 04, 2006 11:04
> > *To:* [email protected]
> > *Subject:* [amibroker] Pivot Points
> >
> >
> >
> > Hi.
> > I take the code below from AFL Library. How can I change month
with week?
> >
> > SetChartOptions(1,chartShowDates);
> >
> > Hi1 =
> >
> >
IIf(Month()!=Ref(Month(),-1),Ref(HighestSince(Month()!=Ref(Month(),-1),H,1),-1),0);
> > Hi = ValueWhen(Month()!=Ref(Month(),-1),Hi1,1);
> > Lo1 = IIf(Month()!=Ref(Month(),-1),Ref(LowestSince( Month()!=Ref
> > (Month(),-1), L,1),-1),0);
> > Lo = ValueWhen(Month()!=Ref(Month(),-1),Lo1,1);
> > CL1=IIf(Month()!=Ref(Month(),-1),Ref(C,-1),0);
> > CL = ValueWhen(Month()!=Ref(Month(),-1),CL1,1);
> > rg = Hi - Lo;
> > bp = (Hi+Lo+CL)/3;
> > R1 = (2*bP) - Lo ;
> > S1 = (2*bP) - Hi;
> > R2 = bP + rg;
> > S2 = bP - rg;
> >
> > Plot(C,"Close",colorBlack,styleCandle);
> > Plot(bp,"Pivot",colorRed,styleBar);
> > Plot(R1,"R1",colorBlue,styleBar);
> > Plot(S1,"S1",colorBlue,styleBar);
> > Plot(R2,"R2",colorBlue,styleBar);
> > Plot(S2,"S2",colorBlue,styleBar);
> >
> >
> >
>
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:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/