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

Re: [amibroker] QuickAFL question



PureBytes Links

Trading Reference Links

Hello,

> hello Tomasz,
> 
> > Q1. Yes. Just add SetBarsRequired( 10000, 0 ); at the top to turn off this effect
> 
> Tomasz, yes I know this function since you helped me last time. I see 
> now how it influences AFL execution in wider context.
> when I use this function:
> 
> q1: is its influence global?
It is per-formula only. It affects entire formula once SetBarsRequired() is called.

> q2: is it possible to use it within the local scope of any function 
> without influence on surrounding code?

If you use SetBarsRequired inside the function it will influence entire
formula BUT... only if given user function is called.
So if you write

function myFun()
{
  SetBarsRequired( 10000, 0 );
}

but do not call myFun anywhere in the code, then it will NOT influence the formula
execution.

> q3: how about including files with SetBarsRequired() used inside: does 
> it affect code in the file form this is included?

Yes - if SetBarsRequired() is called. 
No - if SetBarsRequired() is just 
a inside the body of the user-defined function and that user function is never called.
 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "bromba" <bromba@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, November 21, 2003 10:00 AM
Subject: Re: [amibroker] QuickAFL question



> 
> > Q2. Not really. AFL automatically 'knows' how many bars are needed for given code to calculate properly
> > in most cases. The only cases when you should provide "hint" (via SetBarsRequired) are:
> > - you are using some external plugins
> > - some 'for' loops that access data more than 100 bars back
> 
> thank you. great help..
> regards,
> BM
> 
> 
> 
> 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 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
> 

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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/