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

Re: CL_Re: Opening Range Indicator



PureBytes Links

Trading Reference Links


I'm not sure if you posted all the indicator, but what
you posted is missing a line at the beginning that
resets the values evey day. Something like

If date<>date[1] then Begin
  hi = 0;
  lo = 9999999;
end;
> > St_Time=0930
> > End_Time=1030
> > if time>=St_Time and  time<= End_Time then
> > begin
> >         Hi = MaxList(Hi,high);
> >         Lo = MinList(Lo,low);
> > end;
> >



--- "david b. stanley" <davestan@xxxxxxxxxx> wrote:
> It depends upon whether you are using time or
> tick-based bars and
> if you are using time-based bars, it depends on the
> timeframe.
>   1-tick bars or 1min bars will guarantee that
> nothing is used in
> the calculations prior to 930. Anything larger in
> either category
> will result in prices previous to the open being
> used in the calcs.
>   For larger time-based bars you can change the
> beginning time of
> the calcs to 930 + barinterval.
> 
> dbs
> 
> "John F. Berentson" wrote:
> 
> > I use Michael Mermer's Opening Range Indicator,
> which plots the high and low
> > of the first hour. However, it appears to include
> in its calculation any
> > pre-opening bars. I would like to limit the
> calculation to 0930 - 1030. It
> > uses the following code:
> >
> > if time>=St_Time and  time<= End_Time then
> > begin
> >         Hi = MaxList(Hi,high);
> >         Lo = MinList(Lo,low);
> > end;
> >
> > St_Time=0930
> > End_Time=1030
> >
> > Am I correct that this does not restrict the high
> and low to that between
> > St_Time and End_Time if there is earlier data in
> the same day and that this
> > part of the code must be changed?
> >
> > JFB
> > Shaven Heads Trading
> > NYC
> >
> > The Code List -
> > Subscribe/Unsubscribe
> > http://www.markbrown.com
>