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

Re: [amibroker] Re: Calculating bars between two arguments



PureBytes Links

Trading Reference Links

Stephane,

AB tells me to define a filter variable.

But Dimitris might have discovered in his answer to me why.

Markus
----- Original Message -----
From: "nenapacwanfr" <nenapacwanfr@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, June 29, 2002 8:23 PM
Subject: [amibroker] Re: Calculating bars between two arguments


hope it is that


z=IIf(Low<Ref(LLV(Low,5), -1),1,0);
z= Hold(z==0,2) AND z ;// one pic
zz=ValueWhen(z==1,Low,1);


y=IIf (High>Ref(HHV(High,5), -1),1,0);
y= Hold(y==0,2) AND y ;// one pic
yy=ValueWhen(y==1,High,1);

zy=Flip(z,y);
Plot(z,"",3,1);
Plot(y,"",4,1);


tp=BarsSince(BarsSince(zy));
Plot(tp,"",5,1);


>
> would someone help me with this:
>
> I need to calculate how many time periods have been passed since
>
> zz and yy
>
> whereby
>
> z=iif(low<Ref(llv(low,5), -1),1,0)
> zz=valuewhen(z==1,low,1)
>
> and
>
> y=iif (high>Ref(hhv(high,5), -1),1,0)
> yy=valuewhen(y==1,high,1)
>
> ???????????????
>
> I thought of
>
> barssince (y==1) - barssince (zz==1) but that dosnīt return the
desired result.
>
> Thanks a lot!!
>
> Markus





Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/