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

Re: [amibroker] Re: Subscript Operator question - answered



PureBytes Links

Trading Reference Links

Hello,

Indicators use QuickAFL feature, that's why.

QuickAFL(tm) feature that causes faster charts redraws. QuickAFL works so it calculates only part of the array that is currently 
visible. If you use this feature and your formulas are script based you should add SetBarsRequired function to your code.

In other words indicators do NOT use all data bars available, but only VISIBLE
bars (plus some extra to ensure calculation of used indicators),
so when you are using Close[ 0 ] it represents not first bar in entire data set
but first bar in array currently used (which is just a bit longer than visible area).


If you want to use all bars add
SetBarsRequired( 100000, 100000 );
at the top of your formula.


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "seneca_kw" <seneca_kw@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, January 30, 2005 10:15 PM
Subject: [amibroker] Re: Subscript Operator question - answered


> 
> 
> One more note to self:  I'm not saying you should turn off QuickAFL.  
> In fact, Tomasz has said that's highly discouraged.  I was just 
> saying that by turning it off I could see that this was the source of 
> what appeared to be strange behavior.
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "seneca_kw" <seneca_kw@xxxx> wrote:
>> 
>> Stumbled across the solution:  turn off QuickAFL  
>> (Tools>Preferences>AFL).
>> 
>> Wayne
>> 
>> 
>> --- In amibroker@xxxxxxxxxxxxxxx, "seneca_kw" <seneca_kw@xxxx> 
> wrote:
>> > 
>> > I've finally started to tackle flow control and looping.  For a 
> non-
>> > programmer, it's brutal.  I'm trying to inch forward one tiny 
> step 
>> at 
>> > a time.  My first little project is to understand subscript 
>> > operators.  
>> > 
>> > In the User's Guide, Tomasz gives this example:
>> > 
>> > WriteVal(Close[0]); // prints the first bar of close array
>> > 
>> > Simple enough.  I decided to quickly verify by this by displaying 
>> the 
>> > value in the IB window:
>> > 
>> > Title=WriteVal(Close[0]);
>> > 
>> > Sure enough, it displayed the close of the first bar.  But as I 
>> > scrolled to the right in the main window, the value suddenly 
>> started 
>> > changing.  Why would it change?  Why doesn't it always display 
> the 
>> > close of the first bar?  I've experimented over and over but 
> can't 
>> > figure out where the changed numbers are coming from or what they 
>> > represent.
>> > 
>> > Can someone explain?
>> > 
>> > Thanks,
>> > Wayne
> 
> 
> 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/