PureBytes Links
Trading Reference Links
|
This is similar to a problem I posted a couple of months ago. if
date>date[1] is used with a multidata chart running real-time, I was getting
very inconsistent results. If an indicator has Update Each Tick turned off
and the data is Daysession only data, the following code should run only
once per day but it occasionally runs twice. I think it has something to do
with if the first tick of the second bar comes from data2 instead of data1.
I gave up on it and instead use the end of the previous day for once a day
setups.
if date>date[1] then begin
print(date,time);
end;
//::sam
----- Original Message -----
From: "Ian Waugh" <ianwaugh@xxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Cc: <ianwaugh@xxxxxxxxx>
Sent: Friday, January 09, 2004 10:21 AM
Subject: Re: date>date[1]
> Anyone...?
>
> Ian
>
> > Going bananas with this...
> >
> > On intra-day charts, I quite often want to set up some variables on
> > the first bar of the day and usually use:
> >
> > if data>date[1] then...
> >
> > and it usually seems to work okay. However, I have a chart with
> > minute bars as data1 and daily bars as data2 and it doesn't seem to
> > be working correctly. Should it?
> >
> > However, this:
> >
> > if date>date[1] of data2 then...
> >
> > does seem to work. Comments?
> >
> > However, if I want to use the same code on charts which may not have
> > a second data set it causes problems.
> >
> > Does anyone have any alternative suggestions for code to set up
> > variables on the first bar of the day?
> >
> > Ian
> >
> >
>
>
|