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

Re: [amibroker] Third Friday ?



PureBytes Links

Trading Reference Links

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)