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

Re: Highest High Yesterday



PureBytes Links

Trading Reference Links



Or should it be this?

Ed

// Paste in aa and Explore to check DateNum() or Indicator Builder to 
view

x=BarsSince(DateNum()==Ref(DateNum(),-1));//bars in current day
y=BarsSince(DateNum()==Ref(DateNum(),-2));//bars in current and 
previous day
z=y-x;//bars in previous day
Hmax=Ref(HHV(H,z),-x);//highest high in the prior day time period 
begin the current day number of bars back

Graph0=H;
Graph1=Hmax;

Filter=DayOfWeek() == 1;
AddColumn( DateNum(), "DateNum", 1 );
AddColumn( Ref(DateNum(),-1), "DateNum", 1 );
















--- In amibroker@xxxx, "Sharps_45_70" <sharps_45_70@xxxx> wrote:
> This seems to work.
> 
> Ed
> 
> /////// Drop into indicator builder///////
> 
> x=BarsSince(DateNum()==Ref(DateNum(),-1));
> y=BarsSince(DateNum()==Ref(DateNum(),-2));
> 
> 
> 
> Hmax=Ref(HHV(H,x),-y);
> 
> Graph0=H;
> Graph1=Hmax;
> 
> /////////////////////////////////////////
> 
> ///Check in AA that ref(,-1) ignores weekend ///
> 
> x=BarsSince(DateNum()==Ref(DateNum(),-1));//
> y=BarsSince(DateNum()==Ref(DateNum(),-2));//
> 
> 
> 
> Hmax=Ref(HHV(H,x),-y);
> 
> Graph0=H;
> Graph1=Hmax;
> 
> Filter=DayOfWeek() == 1;
> AddColumn( DateNum(), "DateNum", 1 );
> AddColumn( Ref(DateNum(),-1), "DateNum", 1 );
> /////////////////////////////////////////////