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

[amibroker] Re: Looking for HHV/LLV low code



PureBytes Links

Trading Reference Links


Herman,
According to the definition

hhv( ARRAY, periods )  
RETURNS ARRAY  
FUNCTION  Calculates the highest value in the ARRAY over the 
preceding periods (periods includes the current day).  

we have to compare the current value to all the m previous values and 
save, in each comparison, the max[min] value.

m=10;
x=HHV(C,m);xx=LLV(C,m);
Plot(C,"C",5,1);
h1=C;L1=C;
for(i=1;i<m;i++)
{
h1=Max(h1,Ref(C,-i));
L1=Min(L1,Ref(C,-i));
}
Plot(x,"HHV",1,1);Plot(h1,"HHV1",4,8);
Plot(xx,"LLV",1,1);Plot(L1,"LLV1",7,8);

Dimitris
--- In amibroker@xxxxxxxxxxxxxxx, "Herman van den Bergen" 
<psytek@xxxx> wrote:
> Hello,
> 
> would anybody have a low level afl looping implementation for the 
HHV()
> and/or LLV() functions?
> 
> Many thanks for any code you may have!!
> 
> herman
> 
> 
> 
> [Non-text portions of this message have been removed]





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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