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

RE: [amibroker] Re: [for GARY] Foreign() in TimeFrames question



PureBytes Links

Trading Reference Links

Yarroll,

As I'd posted late last week, there are 3 major
graduations of coding calculations in AmiBroker as far
as I can tell.  As b has pointed out, I seriously
doubt you will see a major difference in speed in the
3 options you've laid out, as AmiBroker is already
crazy fast, particluarly if you are working with
locally stored data.

Regards,
Gary

Running from fastest to slowest:

Linear = 1 * 0 = 0;

Vector = IIF(A, B, C);

Looping

for (i = 0; i < BarCount, i ++)
{
   blah[i];
}



--- b <b519b@xxxxxxxxx> wrote:
> Yarroll,
> 
> AB is amazingly fast especially for most things so I
> doubt
> that there is any observable difference between the
> 3
> alternatives you list. 
> 
> Of course, if you do enough reiterations slight
> differences
> would appear, if, for example, you were running the
> code
> alternatives on a batch of 10,000 stocks. But for
> that
> number of stocks disk access and even RAM access
> speeds
> would be more significant than the alternative
> formulas you
> are considering. 
> 
> Although I have not kept a record, I have noticed
> that some
> formula structures seem to be slower. If my memory
> is
> correct using AMA() is slower than EMA(). 
> 
> Perhaps others have more detailed notes on speed
> differences.
> 
> Regards,
> 
> b
> 
> --- Yarroll <yarroll999@xxxxxxxxxxxxxx> wrote:
> > Hello,
> > 
> > 
> > In Amibroker, which option below is best from the
> > viewpoint of computation
> > speed:
> > 
> > a)
> > (Close-LLV( Low, 15) )  / ( HHV( High, 15) - LLV(
> Low,
> > 15) ) * 100 > 80
> > 
> > or
> > b)
> > (Close-LLV( Low, 15) )  / ( HHV( High, 15) - LLV(
> Low,
> > 15) ) * 10 > 8
> > 
> > or
> > c)
> > (Close-LLV( Low, 15) )  / ( HHV( High, 15) - LLV(
> Low,
> > 15) )  > 0.8
> > 
> > 
> > Also, would it make sense for the same reason
> > (computation efficiency) to
> > round down all computed numbers to integers or at
> least
> > make digit precision
> > smaller. For example, 4-digit precision for
> indicators
> > makes
> > RSI(14)=52.1456, but I think very few people
> require that
> > much precision.
> > So does it make sense to keep using eg. RSI(14),
> or
> > change it into eg.
> > Prec(  RSI(14), 1)
> > 
> > Thank you. Best regards,
> > Yarroll
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs  
> http://hotjobs.sweepstakes.yahoo.com/careermakeover 
> 



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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/