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

[amibroker] Re: TC2000 speed



PureBytes Links

Trading Reference Links

Graeme

I don't want to presume what you have already tried; I know that finding
one's way around the vast amount of information that's available to help
with AFL can be daunting at first.

In the help (see web link previous post) Tomasz explains how to code the
equivalent of IIF using if, viz...
-----------------------------------------------------------
IIF can be re-implemented using new if-else flow control statements. The
code below shows this and explains what IIF in fact does internally.

function _IIF( ConditionArray, TrueArray, FalseArray )
{
   for( i = 0; i < BarCount; i++ )
   {
      if( ConditionArray[ i ] )
      { 
         result[ i ] = TrueArray[ i ];
      } 
      else
      {
         result[ i ] = FalseArray[ i ];
      }
   }
}
-----------------------------------------------------------
Again, hope I'm still being helpful here.
PeterJ

PS:  when using BarCout either turn QuickAFL OFF or provide a
SetBarsRequired(10000,10000) statement at the top of your code.



-----Original Message-----
From: graeme_oswin [mailto:goswin@xxxxxxxxxxx] 
Sent: Tuesday, 4 May 2004 11:58 p
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Conditional looping question

PeterJ,

Thanks for the response.  I've already played around with IIF.  
However, my problem lies in implementing IIF (or if for if-else 
statements using arrays) within loops.  IIF seems limited in its 
implementation in a loop.

I can't easily find a way to find the "optimized' value of the 
variable 'Period' (in the code example) without using a looping 
conditional statment of some sort.

Regards,

Graeme Oswin
.........snip.......



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/