PureBytes Links
Trading Reference Links
|
Ok,
now I am curious.
<SPAN
class=937131619-23112003>
Under
what condition(s) is BarIndex()[0] not equal
zero?
<FONT face=Tahoma
size=2>-----Original Message-----From: Tomasz Janeczko
[mailto:amibroker@xxxxxx]Sent: Sunday, November 23, 2003 10:19
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker]
Barcount vs BarIndex()
Hello,
Again: as written in the user's guide you don't need (and
also should NOT) disable QuickAFL
globally. It is enough to add SetBarsRequired() to the
formula that needs it.
There is a fundamental difference between BarCount and
BarIndex().
BarCount is a NUMERIC variable that holds just one NUMBER
(the count of elements in array).
BarIndex() is a FUNCTION that returns ARRAY representing bar
index.
Just two different things. Different applications,
etc.
BarCount is intended to be used in FOR loops. That's why it
helds actual number of array elements
so you can iterate as follows:for( i = 0; i <
BarCount; i++ )
BarIndex() on the other hand is a faster replacement of
(Cum(1)-1).
LastValue( BarIndex()) does not give you
number of array elements.
There is a following relation between those
two:
bi = <FONT
color=#0000ff>BarIndex<FONT
color=#000000>();
BarCount == 1 + <FONT
color=#0000ff>LastValue(bi)-bi[<FONT
color=#ff00ff>0<FONT
color=#000000>]; <FONT
size=2>
Best regards,Tomasz
Janeczkoamibroker.com
Yahoo! Groups Sponsor
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|