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

RE: Recognising a new month starting



PureBytes Links

Trading Reference Links

Hi Maxime,

None of the functions in TS2000i seem to be able to reference tomorrow.
Is 'date of tomorrow' a TS8 function?  Even if it was though, I'm not
sure it would work if the last trading day occurred before the 31st.
It's a tricky puzzle.  I'll restate the problem, but generally you are
on the right track Maxime.

PROBLEM:  To run a Paintbar study that highlights the last bar,
indicating that today (i.e. the first trading day of the month) is a new
month. The complication is to overcome when the last day of the month
isn't a trading day or when the first trading day of the month isn't the
1st. 

Adrian 

> -----Original Message-----
> From: the.crocs [mailto:the.crocs@xxxxxxxxxx] 
> Sent: Thursday, 6 January 2005 2:07 AM
> To: omega-list@xxxxxxxxxx
> Subject: Re: Recognising a new month starting
> 
> 
> 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 
> 
>