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

RE: Recognising a new month starting



PureBytes Links

Trading Reference Links

Hi Bob,

Thanks for the reply, but I think you mean if DOM < DOM[1] don't you?
This might work for backtesting but it won't lead for example to being
able to highlight in a Paintbar study that there is a trade today (being
the first trading day of the month). The problem is that the DOM is
referencing the last bar on the chart isn't it, rather than looking at
the date you are running the study. And you can't see to reference a
forward date. 

Adrian

> -----Original Message-----
> From: Bob Fulks [mailto:bfulks@xxxxxxxxxxxx] 
> Sent: Thursday, 6 January 2005 1:44 AM
> To: Adrian Pitt; omega-list@xxxxxxxxxx
> Subject: Re: Recognising a new month starting
> 
> 
> 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;
> 
> 
> Bob Fulks 
>