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

Re: system code



PureBytes Links

Trading Reference Links

----- Original Message -----
From: <Jdev02@xxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Monday, January 28, 2002 7:52 PM
Subject: system code


: Can anyone show me how I might code a signal to enter on the first and
last
: Monday of the month?  thanks/John .........jdev02@xxxxxxx
:

Unverified:

vars: dow(0), dom(0), mnth(0);

dow=dayofweek(d);
dom=dayofmonth(d);
mnth=month(d);

if dow=1 and dom<8 then sell on close;
if dow=1 and mod(mnth,2)=0 and dom>=24 then exitshort on close; {*problem
when last monday is 31st*}
if dow=1 and mod(mnth,2)<>0 and dom>24 then exitshort on close;