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

RE: [amibroker] Re: Reverse engineering eSignal ZigZag code



PureBytes Links

Trading Reference Links










You could just have simple statements, something like these

 

NumDownBars = barssince( c >= ref(C,-1) );

NumUpBars = barssince( c <= ref(C,-1) );

NumEqualBars = barssince ( c!=ref(c,-1) );



Cheers,
Graham
http://e-wire.net.au/~eb_kavan/ 



<span
>-----Original Message-----
From: ed [mailto:ed2000nl@xxxxxxx]

Sent: Thursday, July 22, 2004 5:34
PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] consecutive
down days | looping

<font size=2
face="Times New Roman"> 



<span
>hi,





<font size=2
face="Times New Roman"> 





<span
>below a little code to show
consecutive down days. I need loopings to do this. I wonder if it would be
possible to avoid the loopings and just use AFL array based coding to do this.
Any ideas?





<font size=2
face="Times New Roman"> 





<span
>rgds, Ed





<font size=2
face="Times New Roman"> 





<span
>tt = <span
>IIf(<span
>C < <span
>Ref(<span
>C,-<span
>1),<font
color=fuchsia>1<span
>,0<font
color=black>); 

for<font
color=black> (i=<span
>1;
i<BarCount; i++) { 

   if (tt[ i ] == 1<font
color=black> AND
tt[ i - 1<font
color=black> ] >= <font
color=fuchsia>1<span
>) { 

      tt[ i ] = tt[ i ] + tt[ i - <font
color=fuchsia>1<span
> ]; 

   } 

} 

Plot<font
color=black>(tt,<span
>""<span
>,colorWhite,<span
>styleHistogram | styleThick); 



<font size=2
face="Times New Roman">

Check AmiBroker web page at:<font
face="Courier New">
http://www.amibroker.com/

Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html










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

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.