PureBytes Links
Trading Reference Links
|
At 9:45 AM -0500 12/24/98, DPoiree@xxxxxxx wrote:
>
>I am trying to write some simple code to use on daily data and could use a bit
>of help. I'd like to write "If {the} Month {of this bar is} <> {to the}
>Month[1] then begin" In other word, "If the month has chanced since the prior
>bar begin." Same for the week. I haven't had any luck with the manual so any
>help will be greatly appreciated.
The following code should work.
Bob Fulks
-----
Vars: Mo(0), Dow(0);
Mo = Month(Date);
DoW = DayOfWeek(Date);
if Mo <> Mo[1] then ... {True on first trading day of month}
end;
if DoW < DoW[1] then {True on first trading day of week}
end;
|