[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


Stephane,
You may decrease the steps if you use arrays.
Dimitris
--- In amibroker@xxxxxxxxxxxxxxx, "s.carrasset" <s.carrasset@xxxx> 
wrote:
> clean code:
> 
> function HHVal (array,Val)
> {
> result=maxval=thisval=H[0];
> for( i = Val; i < BarCount; i++ )
> {
> Maxval=array[i];
> for(j=1;j<Val && j<=i;j++)
> {
> thisval=array[i-j];
> if(thisval>Maxval)
> Maxval=thisval;
> result[i]=maxval;
> }
> }
> return result;
> }
> 
> Plot(HHVal(H,10),"",colorWhite,1);
> Plot(C,"",1,64);
> Plot(HHV(H,10),"",colorBlue,1);





------------------------ 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/