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

Re: How do I find the first bar of the day on an intraday file?



PureBytes Links

Trading Reference Links

"Owen Davies" <owen@xxxxxxxxxxxxx> writes:
>The subject line about says it.  I've just tried to test a trading
>technique that requires identifying the high and low since the
>first bar of the day.

Um... the classic way to identify the first bar is to watch for
a change of date:

  if date <> date[1] then begin
    firsthigh = High;
	firstlow  = Low;
  end;

It gets more interesting if you're trading a 24-hour market like
the S+P, and want to pick out the first bar of the day session.
In that case you get into some rather baroque conditions involving
session starting and ending times.

Jim