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

RE: [amibroker] Re: AmiBroker 5.14.0 BETA released



PureBytes Links

Trading Reference Links

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: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Tomasz Janeczko
Sent: Sunday, 6 July 2008 7:23 PM
To: amibroker@xxxxxxxxxxxxxxx
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.
 
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

Cum);
SetBarsRequired1000); // 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" <paultsho@xxxxxxcom.au>
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
amibroker@xxxxxxxxxps.com, "Paul Ho" <paultsho@xxx> 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
>
> <*> To visit your group on the web, go to:
>   
http://groups.yahoo.com/group/amibroker/
>
> <*> Your email settings:
>    Individual Email | Traditional
>
> <*> To change settings online go to:
>   
http://groups.yahoo.com/group/amibroker/join
>    (Yahoo! ID required)
>
> <*> To change settings via email:
>   
mailto:amibroker-digest@xxxxxxxxxps.com
>   
mailto:amibroker-fullfeatured@yahoogroups.com
>
> <*> To unsubscribe from this group, send an email to:
>   
amibroker-unsubscribe@xxxxxxxxxxxxcom
>
> <*> Your use of Yahoo! Groups is subject to:
>   
http://docs.yahoo.com/info/terms/
>

__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___