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

Re: Flagging a Date



PureBytes Links

Trading Reference Links

At 12:12 PM 8/25/2004, Tabb Thrift wrote:

>Is there a way to flag the first Monday or Friday of each month in
>Tradestation? Any help is appreciated.....

Something like below? (Untested)

Bob Fulks

-----------------

Vars: Mo(0), NewMonth(FALSE), FirstMonday(FALSE);

FirstMonday = FALSE;
Mo = Month(Date);

if Mo > Mo[1] the NewMonth = TRUE;

if NewMonth and DayOfWeek = 2 then begin
   FirstMonday = TRUE;
   NewMonth = FALSE;
end;