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

Re: entry signal



PureBytes Links

Trading Reference Links

At 7:58 PM -0500 1/13/02, Jdev02@xxxxxxx wrote:

>Can anyone help me with this code.  I want to buy long the S&P 500 on the
>close of the Friday of the week prior to the option expiration and exit on
>the first profitable opening.  I've got the exit and stops but I'm having
>trouble with the setup...Thanks/John

This should do it:

   Vars: DTE(0);

   DTE = DaysToExpiration(Month(Date), Year(Date));

   if DayOfWeek = 5 and DTE > 3 and DTE < 10 then Buy at close;

It misses Friday holidays but that is a bit more complicated...

Bob Fulks