PureBytes Links
Trading Reference Links
|
I ran into this problem a loooooong time ago, drove me crazy. What I
ended up doing (After trying a bizillion and one other strategies) was
simply looking back in time instead of forward
For example
if date <> date[1] then .....................................
So, for example, if I was calculating like total daily return (or
something else of interest), on the 2nd last bar of the day, the value
would be correct. On the very last bar on the day, the value would be
wrong; however, on the beginning of the next bar, i would go back and
over-write the previous days value with the proper one, as wel as handle
the current bars value properly.
Make sense? It's a long way around it, but it'st he best way i could
ever figure out.
-Alex
Scott Hoffman wrote:
Looking for DLL to access next bar's date. Purpose is to determine
last intraday bar of day.
Can't use "if Date <> Date Next Bar" construct since this is not
allowed if strategy uses more than Data1.
Can't use "if Time = SessionEndTime" since the time of last bar of
some days is before SessionEndTime for certain less liquid markets.
TIA,
Scott
|