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

Re: Highest High Yesterday



PureBytes Links

Trading Reference Links

Finally, you will be more safe if you replace the past line with the 
Lastvalue(), ie

x=DateNum()<LastValue(DateNum());//true for all dates except the last
z=LastValue(ValueWhen(x,DateNum()));//the previous date datenum()
Cond=DateNum()==z;//true only for the previous day
H1=Cond*H;//gives all H of previous day, the rest are 0
Hmax=Lastvalue(Highest(H1));

I give an daily data example:
Suppose you search the highest last June H.
It comes from

Cond=DateNum()>1020600;
H1=Cond*H;
Hmax=Lastvalue(Highest(H1));
DT
--- In amibroker@xxxx, "dtsokakis" <TSOKAKIS@xxxx> wrote:
> No, it should not work.
> It will give the H of the last 5 min bar.
> Let us try the following:
> x=DateNum()<LastValue(DateNum());//true for all dates except the 
last
> z=LastValue(ValueWhen(x,DateNum()));//the previous date datenum()
> Cond=DateNum()==z;//true only for the previous day
> H1=Cond*H;//gives all H of previous day, the rest are 0
> Hmax=Highest(H1);//this is probably the solution
> Give it a try
> DT
> --- In amibroker@xxxx, "dtsokakis" <TSOKAKIS@xxxx> wrote:
> > Rick,
> > I have no experience of RT exploration.
> > I suppose you can not use cum(1), since it would count 5min bars.
> > But, try the
> > x=DateNum()<LastValue(DateNum());
> > y=LastValue(ValueWhen(x,H));
> > Does it work ?
> > Dimitris
> > --- In amibroker@xxxx, "Rick Parsons" <RickParsons@xxxx> wrote:
> > > Using RT data where bars may be in minutes: 5 minutes, 15 
> minutes 
> > etc.
> > > 
> > > How do I find the highest high for the prior market day?
> > > 
> > > One must consider that if it is Monday, I need the Highest High 
> for 
> > Friday.
> > > 
> > > I need AFL code that will narrow this down to just the previous 
> > market day.
> > > 
> > > Thanks to all for the help.
> > > Rick