PureBytes Links
Trading Reference Links
|
I think this will work:
if dayofweek(date) = wkday and intportion((dayofmonth(date)-1)/7)=N-1 then
begin { got target date }
N is the Nth occurance you're looking for and WKDAY is the week day you're
loooking for.
So, for example if WKDAY=2 and N=3 it should find the third Tuesday of the
month
Hope this helps
Paul
-----Original Message-----
From: muzzy@xxxxxxxx <muzzy@xxxxxxxx>
To: omega-list@xxxxxxxxxx <omega-list@xxxxxxxxxx>
Date: Wednesday, July 12, 2000 2:03 AM
Subject: re: E/L coding problem
>If this has come through 2 or 3 times sorry, my email
>program kept telling me it did finish sending the email
>
>{************************************************************}
>
>hi there,
>
>I have a problem trying to code this idea.
>
>{Entry}
>If it is the FIRST Monday of the month
>Then Buy at the open of the first Monday of the month ;
>
>{Exit}
>Setexitonclose;
>
>Now FIRST in the entry must be an input so I can see what
>happens on the second Monday, third Monday etc
>
>Also Monday in the Entry must be an input so I can test
>the third Wednesday and also fourth Tuesday of the month
>
>This way I can find out what the average daily open to close
>range is for the second Friday of the month etc.
>
>How would I code this?
>
>Regards and thanks in advance
>Paul
>
>
>
|