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

Re: Yesterday's high & low on intraday data



PureBytes Links

Trading Reference Links

Try somthing like this:
 
   {New Day Count}
DW:= If(DayOfWeek<>ref(DayOfWeek(),-1),{then}1,{else}0);
   {Daily High}
DH:=If(DW=1,{then}ref(HighestSince(1,DW=1,H),-1),{else}0);
DH1=ValueWhen(DH<>0);
   {Daily Low}
DL:=If(DW=1,{then}Ref(LowestSince(1,DW=1,L),-1),{else}0);
DL1:=ValueWhen(DL<>0);
    {Indicator Plot}
DH1;
DL1;

Please check for syntax errors...since I dont have MetaStock Pro
to check for myself.

Adam Hefner



----- Original Message ----- 
From: Owen Davies <owen@xxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Friday, November 10, 2000 2:01 PM
Subject: Yesterday's high & low on intraday data


> I'm looking for help in how to use them in an indicator or system
> and can't figure out how to capture them.  I especially want to figure
> out yesterday's range.  If days all had the same number of bars,
> I'd write something like
> 
> If(DayOfWeek() <> Ref(DayOfWeek(), -1), HHV(High, NumberOfBars)
> - LLV(Low, NumberOfBars), PREV)
> 
> More likely, I'd figure out some way to get rid of that PREV; it
> takes too darned much processor time.
> 
> Unfortunately, some days are shorter than others, and you
> never have a bar for every minute.  Therefore, the above
> won't work.  Can't do it with a ValueWhen(), either, nor anything
> else I've thought of.
> 
> Can anyone out there help me figure this one out?
> 
> Many thanks.
> 
> Owen Davies
> 
>