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

[amibroker] Optimization or Backtest, which is faster ?



PureBytes Links

Trading Reference Links




thanks Dimitris,
 
another interesting solution (that needs some 
study),
 
rgds, Ed
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  DIMITRIS 
  TSOKAKIS 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, July 22, 2004 1:01 
  PM
  Subject: [amibroker] Re: consecutive down 
  days | looping
  Ed,You could avoid your [nice] loop,tt = IIf(C 
  < Ref(C,-1),1,0); for (i=1; i<BarCount; i++) {    if 
  (tt[ i ] == 1 AND tt[ i - 1 ] >= 1) {       
  tt[ i ] = tt[ i ] + tt[ i - 1 ];    } } 
  Plot(tt,"tt",colorWhite,styleHistogram | styleThick); 
  f=C<Ref(C,-1);z=f*Sum(f,1+BarsSince(f AND 
  Ref(f,-1)==0));Plot(z,"z",4,1);if this loopless solution is not 
  complicated.Dimitris Tsokakis--- In amibroker@xxxxxxxxxxxxxxx, 
  "ed" <ed2000nl@xxxx> wrote:> hi,> > 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?> > rgds, Ed> > tt = 
  IIf(C < Ref(C,-1),1,0); > > for (i=1; i<BarCount; i++) { 
  > >    if (tt[ i ] == 1 AND tt[ i - 1 ] >= 1) 
  { > >       tt[ i ] = tt[ i ] + 
  tt[ i - 1 ]; > >    } > > } 
  > > Plot(tt,"",colorWhite,styleHistogram | 
  styleThick);Check AmiBroker web page at:<A 
  href="">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.