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

Re: [amibroker] No Joy with STATUS output: firstVisibleBarIndex and lastVisibleBarIndex


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] No Joy with STATUS output: firstVisibleBarIndex and lastVisibleBarIndex
  • From: "Ara Kaloustian" <ara1@xxxxxxxxxx>
  • Date: Tue, 4 Sep 2007 12:33:04 -0700

PureBytes Links

Trading Reference Links

AB does that automatically by not loading all data, unless required by your 
calculations.

AB uses Quick AFL, which load a few more bars than visible, but far fewer 
than available.


----- Original Message ----- 
From: "cdkylstra" <cdkylstra@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, September 03, 2007 6:13 PM
Subject: [amibroker] No Joy with STATUS output: firstVisibleBarIndex and 
lastVisibleBarIndex


> Hi All,
>
> I want to obtain the first and last visible bars on the display so
> that I can re-calculate the indicators just for that portion of the
> data, i.e., only for what is showing.  This is an attempt to speed up
> the display of results by not re-calculating the indicators for the
> entire time series.
>
> From the forums, STATUS is clearly the right function to use.
>
> However, I must be missing something, because the values output by
> STATUS don't match the index numbers of the first and last visible
> bars.  In fact, if I don't select a date/bar, yet move the scroll
> slider to view different portions of the time series, the output
> values remain constant, as if I was still looking at the very end of
> the data series.
>
> (BTY, I am using AB 4.90.5, May 27, 2007; Windows XP SP2.  )
>
> Here is what I added to my afl chart equations, just before calling
> the function with which I want to calculate just the data to display.
>
> printf("\nStatus Info\n" );
>
> printf( "1stVB  = " + Status( "firstvisiblebar" ) + "\n" );
> printf( "LstVB  = " + Status( "lastvisiblebar" ) + "\n" );
> printf( "1stVBI = " + Status( "firstvisiblebarindex" ) + "\n" );
> printf( "LstVBI = " + Status( "lastvisiblebarindex" ) + "\n" );
>
>
> Here is typical output in Interpretative Window
>
> Status Info
> 1stVB  = 1749
> LstVB  = 1926
> 1stVBI = 1749
> LstVBI = 1926
>
> 1926 (+1) is the number of bars in the time series, i.e., BarCount ==
> 1927.
>
> 1749 seems to be related to the default number of bars displayed,
> which is 159, plus 10 blank bars in right margin.  However, the
> different is 177, or 178 bars (= 1926 - 1749 + 1).  I assume this pads
> a little on the Left (~18 bars) for indicator startup transients.
>
> When I first started checking the STATUS output, I had SetBarsRequired
> commented out.  And the 1st and last visible bars (VB) showed numbers
> like 59 and 217 (difference is 159), while the VBI numbers were as
> above.  Once I used SetBarsRequired, however, it did not matter what
> parameters I used or even if I removed SetBarRequired.  The VB and VBI
> values remained identical, as above.
>
> If I pulled the scoll bar at the bottom to the left, back in time, the
> above values did not change.  It was as if I was still looking at the
> end of the times series.
>
> If I selected a bar, the "last" values do change, however, they
> changed to the index of the selected bar, not the index of the last
> bar on the right side of the display.  And the first values changed to
> a value 177 less than the last values, even if I selected a bar near
> the left side of the display.
>
> Oh yes, I can zoom in or out and the output values do not change, even
> with the doubling or halving of the display.
>
>
> So, I am not getting the literal left and right sides of the display,
> even allowing for padding.
>
> Would appreciate any guidance.
>
> Chester
>
>
>
>
> 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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 



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@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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