PureBytes Links
Trading Reference Links
|
If you are not dealing with a lot of instruments you can export the date
and then re-import the date data as data2 less some mixed number of
trading days, say 30. Then you can reference future dates as past data.
Its not very pretty.
Gabriel
-----Original Message-----
From: Gary Fritz [mailto:fritz@xxxxxxxx]
Sent: Monday, March 08, 2004 11:48 AM
To: Roger Shepherd
Cc: omega-list@xxxxxxxxxx
Subject: Re: EL Help question
> Can someone help me with an EL coding question? I am trying to
> determine what business day of the month the current bar is. What I
> want to determine is is today's date the third to the last trading
> day of the month. All I can find is functions and reserved words
> which deal with calandar days not business days.
The best way to determine what trading day (not business day) the
current day is, is to count them as they go by, i.e.
if Month(Date) > Month(Date[1]) then TradingDay = 0;
if Date > Date[1] then TradingDay = TradingDay + 1;
That tells you how many trading days have occurred in the month
so far, and what # trading day the current bar is in.
But how do you tell the "third from the last" trading day, unless
you know how many trading days are left in the month? You need a
way to figure if future days are trading days, and that's a lot
trickier. You can check to see if the next N calendar days are
weekdays, and see if there are only 2 more weekdays left in the
month, but that won't help you for holidays. You'd have to
handle that yourself.
Gary
|