Hello,

Yes, your understanding is now fully correct.

I know that you have read the docs, and I am glad you did,
but as you can see I did not really need to write anything more than
what was already available. Just repeated/copied what was written already, but 
this time it worked.

I perfectly know that you must be saying "I will kill TJ if he says read the 
docs again",
but please belive me I am not saying it because I am that bad, but just because 
I know
that the exact answer is there. Of course it is easier when somebody brings it 
"on the plate",
but  sometimes I do not really have energy/time to do so.
And while I am usually very keen to help first-timers/beginners, I expect more 
from local experts.

I agree that everybody can interpret things differently,  but I only say, that 
if somebody is in doubt,
one should say so, instead of assuming that somebody's interpretation is 
correct.

I would imagine, that if I was in doubt I would say
"I don't know if I interpret things correctly, ...."
or
"Is my assumption correct that ...... "

That would make finding actual "help" requests on the list. Statements without 
such clause
may cause impression that person does not ask, but states the 100% sure facts.
And that then leads to full thread of misunderstandings that take hours/days to 
straighten out.

Better yet use e-mail to support.  If in doubt there is no better way.

Best regards,
Tomasz Janeczko
amibroker.com
  ----- Original Message ----- 
  From: Paul Ho 
  To: [email protected] 
  Sent: Sunday, July 06, 2008 11:56 AM
  Subject: RE: [amibroker] Re: AmiBroker 5.14.0 BETA released


  Thank you Tomasz,
  I read the document, a number of times in fact.but I dont think I understood 
what you were trying to say.
  But I think I get it now.
  The last setbarsrequiared overwrites what is being estimated, and its the 
last statement that counts. I always had a different impression.
  for example
  beta = MA(C, 50); // AB wants 80 bars

  SetBarsRequired(0, 0); // I overwrite it, now uses 0 past bars

  alpha = MA(C, 50); // AB estimates 80 bars again

  SetBarsRequired(0, 0); // I overwrite it again; in fact.

  Am i correct? 

  Of course I actually only need to put the SetBarsRequired statement once in 
the right place to overrides everything.
  Please understand Tomasz, different people intreprets what you say 
differently,  through no fault of their own. It is good that You can provide 
further explanations on a forum like this.
  I am now REALLY happy. custom cutting databases is a thing of the past for me.


----------------------------------------------------------------------------
    From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
Tomasz Janeczko
    Sent: Sunday, 6 July 2008 7:23 PM
    To: [email protected]
    Subject: Re: [amibroker] Re: AmiBroker 5.14.0 BETA released



    Hello,

    You don't need to "experiment" - it is all documented.

    1.  "In other words, we cant manually overrides the no of bars that AB 
internally decides it needs" 

    Wrong. You can override everything.

    You are missing the reading exactly in the same way as Fred.
    http://www.amibroker.com/kb/2008/07/03/quickafl/

    The information you are looking for is written in the "IMPORTANT NOTES" 
section,
    so let me copy it here and highlight the section that you should NOT skip 
when reading:

    It is also worth noting that certain functions like cumulative sum (Cum()) 
by default request ALL past bars to guarantee the same results when QuickAFL is 
enabled. But when using such a function, you may or may NOT want to use all 
bars. So SetBarsRequired() gives you also ability to DECREASE the requirements 
of formula. This is done by placing SetBarsRequired at the END of your formula, 
as any call to SetBarsRequired effectively overwrites previously calculated 
estimate. So
    if you write

    x = Cum( 1 );
    SetBarsRequired( 1000, 0 ); // use 1000 past bars DESPITE using Cum()


    You may force AmiBroker to use only 1000 bars prior first visible even 
though Cum() by itself would require all bars.

    2. Yes it sums requirements. Again, everything is described in document 
mentioned above.  So let me copy it and highlight relevant part

    Now, how does AmiBroker know a correct "backward ref" and "forward ref" for 
the entire formula?
    Well, every AmiBroker's built-in function is written so that it knows its 
own requirements and adds them to global "backward ref" and "forward ref" each 
time given function is called from your formula.


    As to your suggestion - it is already possible via SetBarsRequired placed 
at the end see point 1.

    One comment:
    that is why I always say: please read carefully as I tend to write short 
docs where every sentence and every word counts and is important.

    Best regards,
    Tomasz Janeczko
    amibroker.com
    ----- Original Message ----- 
    From: "Paul Ho" <[EMAIL PROTECTED]>
    To: <[email protected]>
    Sent: Sunday, July 06, 2008 8:50 AM
    Subject: [amibroker] Re: AmiBroker 5.14.0 BETA released


    > After a bit of experimentation, I can answer most of my own queries
    > 1. SetBarsRequired - the backref parameter doesnt change the no of 
    > past bars that AB says it needs, but it changes the initial buffer 
    > (30 bars). So setbarsrequired(30, -1) has the same effect as 
    > setbarsrequired(-1, -1). In other words, we cant manually overrides 
    > the no of bars that AB internally decides it needs
    > 2. if you enter setbarsrequired(0, 0); and A = MA(c, 50); the check 
    > and Profile tells you that you'll need 50 past bars. Fair enough. 
    > However, if you also put in B = MA(c, 50), it now says you'll need 
    > 100 bars. I can only say that AB always assumes the most pessimistic 
    > scenario in calcuating the past bars required. Thats probably 
    > explains why I end up with such a large no. for my AFL. while in 
    > reality it only uses a fraction of that past data.
    > 
    > And finally a question to Tomasz if I may, would you consider a means 
    > for the more adventurous users to overrides the defaults, In other 
    > words, means for me to tell AB I only want a certain number of past 
    > bars, sometime in the future.
    > 
    > Paul.
    > 
    > --- In [email protected], "Paul Ho" <[EMAIL PROTECTED]> wrote:
    >>
    >> Hi
    >> I have just done some checking on my afls. I have been custom 
    > cuting 
    >> databases for a few years now to speed up run time. So I know 
    >> from experience how much data these afls need before the start 
    > date. 
    >> In looking at Code Check & profile, One of the AFLs state I need 
    > 4342 
    >> past bars before the start date, which is approx 20 years of daily 
    >> data. I only have approx 18 years. So using QuickAFL wouldnt make 
    > any 
    >> difference to the execution time. But from experimenting with 
    > various 
    >> starting date in my custom database, I know that  this afl only 
    > needs 
    >> 400 bars (1 & 1/2 years) of data before the start date. Obviously, 
    >> 400 bars back would make a marked difference in speed (thats why I 
    >> started this years ago).
    >> I do not know why there is a difference between what AB calculates 
    >> and what it actually uses. 
    >> I also notice that setting the bars required manually to something 
    >> less than what Code and Profile says makes no difference to either 
    >> the results (which I would expect to ) or runtime. Is that correct 
    >> that setbarsrequired cannot be set to less than What AB calculates?
    >>
    > 
    > 
    > 
    > ------------------------------------
    > 
    > Please note that this group is for discussion between users only.
    > 
    > To get support from AmiBroker please send an e-mail directly to 
    > SUPPORT {at} amibroker.com
    > 
    > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
    > http://www.amibroker.com/devlog/
    > 
    > For other support material please check also:
    > http://www.amibroker.com/support.html
    > Yahoo! Groups Links
    > 
    > 
    > 

   

Reply via email to