PureBytes Links
Trading Reference Links
|
Thank you Tomasz, Dimitris and Brian.
My Exploration is running well now.
Keith
--- In amibroker@xxxx, "dtsokakis" <TSOKAKIS@xxxx> wrote:
> Someone asked in the past for the 4th Thursday high.
> Now, the third Friday of the [trading] month [not the third
calender
> Friday]
> comes when the following condition is met.
> /3rd trading Friday*/
> x1=Month()!=Ref(Month(),-1);
> x2=DayOfWeek()==5;
> F1=Sum(x2,1+BarsSince(x1));
> condition=F1==3 AND Ref(f1,-1)==2;
>
> For example, in AA window, run the exploration
> x1=Month()!=Ref(Month(),-1);
> x2=DayOfWeek()==5;
> F1=Sum(x2,1+BarsSince(x1));
> Filter=F1==3 AND Ref(f1,-1)==2;
> AddColumn(DayOfWeek(),"");
> to see the 3rd Friday of each trading month.
> Note that for American stocks, the 3rd friday of Sept 2001 was the
> 28th.
> For other stocks it was the 21st.
> Dimitris Tsokakis
> --- In amibroker@xxxx, "Tomasz Janeczko" <tj@xxxx> wrote:
> > Brian,
> >
> > You can not write Day() == (15 or 16 or 17 or 18 or 19 or 20 or
> 21 );
> > because operation in parentheses is executed first and
> > Day() is compared to the result of 15 or 16 or 17 or 18 or 19 or
20
> or 21
> > which is True (1). This is so because OR is a logical operator
> > and non-zero value is interpreted as True so
> > 15 or 16 or 17 or 18 or 19 or 21 is interpreted
> > as True Or True Or True Or True Or True
> > and gives True (1).
> >
> > What you want achieve has to be coded in a following way:
> >
> > Day() == 15 or Day() == 16 or Day() == 17 or Day() == 18 or Day()
> == 19 or Day() == 20 or Day() == 21;
> >
> > Instead of such long statement it is better to write:
> >
> > ( Day() >= 15 AND Day() <= 21 )
> >
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "saltyla1" <saltyla1@xxxx>
> > To: <amibroker@xxxx>
> > Sent: Wednesday, July 17, 2002 6:48 PM
> > Subject: Re: [amibroker] Third Friday ?
> >
> >
> > > Hello,
> > >
> > > This is not tested, but maybe it will give you direction.
> > > On my calendar the second or fourth Friday
> > > will never fall on or between the days 15 and 21,
> > > but the third Friday will.
> > >
> > > result=iif(DayOfWeek()== 5 ==
> > > day()==(15 or 16 or 17 or 18 or 19 or 20 or 21) and
> > > DayOfWeek()== (5 or 4 or 3),0,1);
> > >
> > > Buy = MyRule AND result;
> > >
> > > HaND,
> > > Brian
> > >
> > >
> > > ----- Original Message -----
> > > From: "kbennett99"
> > > |
> > > | Is it possible to code in AFL to avoid trades on the third
> Friday of
> > > | each month AND the preceeding two days.
> > > |
> > > | Something like:
> > > |
> > > | Buy = MyRule AND DayOfWeek()!= 5;
> > > |
> > > | but applied only to the third Friday (+ the preceeding 2 days
> if
> > > | possible), not every Friday.
> > > |
> > > | Keith (B)
> > >
> > >
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
|