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

RE: date>date[1]



PureBytes Links

Trading Reference Links

Ian,

The other issue you may want to be aware of is that of half sessions,
you will have a few inaccurate data points. You can manually code
exceptions for those days but it is a pain. 

Gabriel

-----Original Message-----
From: unicorn@xxxxxxxxx [mailto:unicorn@xxxxxxxxx] On Behalf Of Alex
Matulich
Sent: Friday, January 09, 2004 1:25 PM
To: ianwaugh@xxxxxxxxx
Cc: omega-list@xxxxxxxxxx
Subject: Re: date>date[1]


Ian:

>sess1firstbartime  returns the time of the *end* of the first bar which
>effectively would leave the first bar out of any calculations, is that 
>right?

No, that's wrong.

The values Open, High, Low, Close always refer to the bar that has just
completed.  Therefore when time=Sess1FirstBarTime, then the values Open,
High, Low, and Close pertain to that first bar.  It will not be left
out.

This makes sense when you think about it.  One can't know future prices,
so the *only* possible way to interpret O,H,L,C are as prices of the
most recently-completed bar.

>If so, are there any other alternatives? What do you clever
>programmers use?

There are other times, like Sess1StartTime, but you don't want to test
if time=Sess1StartTime because it will never be true unless a bar closes
at that time.  Instead you might try if time crosses over Sess1StartTime
then...

Which is equivalent to
if time=Sess1FirstBarTime then....

But the "crosses over" test will still work in those rare cases when you
might be missing the first bar of the day in your data.

-Alex