PureBytes Links
Trading Reference Links
|
Barry,
BarCount is the number of cells loaded by Quick AFL. BarIndex() is the
actual bar number of ENTIRE array... therefore LastValue(BarIndex()) is the
total number of cells in data set.
if you define bi = BarIndex();
then LastValue(BarIndex()) = BarCount-1 + bi[0];
where bi[0] is the first cell loaded by Quick AFL
So if you want a particular cell number of the array that is loaded, then
ai = bi - b[0];
----- Original Message -----
From: "Barry Scarborough" <razzbarry@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, September 26, 2008 6:50 AM
Subject: [amibroker] Barcount vs BarIndex
>I understand that barCount is a var with the number of elements in an
> array and BarIndex is the offset to a cell and BarCount = BarIndex() +
> 1. What I don't understand is when I use printf to show the bar number
> the value is wrong. This is what I use to show the value of each
>
> printf("Barcount " + NumToStr(BarCount, 1.0, False) + "\nIndex " +
> NumToStr(LastValue(BarIndex()), 1.0, False));
>
> If I use the Yellow - to put all bars on a sheet then BC = BI + 1. In
> this case BI = 8652 and BI 8651.
>
> Here is the interesting part. If I use the Green + to show the minimum
> number of bars on a sheet, 11 in this case, and I put the cursor in the
> white space to the right of the last bar or on the last bar then BI
> stays the same but now BC = 44. As I move the cursor left to each
> preceding bar the BC gets larger, +1, for each step to the left. The
> left most bar 54. If I press the yellow - to show more bars then the
> right most bar has a value of 51 now, not 44. And the BC number
> increases +1 from 51 as I move the cursor left to each bar.
>
> What is going on? At least I would expect BC to be 8652 on the right
> most bar and decrease 1 as I move the cursor the each bar to the left.
> BI Stays the same no matter where the cursor is.
>
> Thanks,
> Barry
>
>
> ------------------------------------
>
> **** IMPORTANT ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> *********************
> TO GET TECHNICAL 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
>
>
>
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL 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/
|