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

Re: Recognising a new month starting



PureBytes Links

Trading Reference Links

On Wednesday, January 05, 2005 15:44 [GMT+1], Bob Fulks  wrote:

At 06:32 AM 1/5/2005, Adrian Pitt wrote:

I'm struggling to find a way to get TS to see if 'today' is a new month
compared to the last trading bar.

How about:

Var: DOM(0);

DOM = DayOfMonth(Date);

if DOM > DOM[1] then begin
  ...
end;

Hello,

According to his email, it looks like Adrian wants to know in advance, ie if tomorrow will be a new month.
Thus I think what you need Adrian is the following:

if month(date) <> month(date of tomorrow) then begin
....
end;

Good trading.

--
Maxime