PureBytes Links
Trading Reference Links
|
Sheesh,
You'd think I'd have this figured out, as many times as I've
used BarCount but...
BarIndex() doesn't appear to have any relation to
Barcount.
I have 5988 bars loaded and view 255 at a time, so
plot(BarIndex()) shows 5986 but plot(Barcount) shows 410?
Where does the 410 come from?
Description for BarCount in the AFL Reference Manual
is:
"BarCount constant gives the
number of bars in array (such as Close, High, Low, Open, Volume, etc). Array
elements are numbered from 0 (zero) to BarCount-1.
"
Doesn't the 'array' extend from the first bar to the last
bar?
<FONT
color=#0000ff>
The description for BarIndex() is:
"returns zero-based bar number - the same as
Cum(1)-1 but it is much faster than Cum(1) when used in
Indicators"
<FONT
color=#0000ff>
Here's where I derailed:
" LineArray( x0, y0, x1, y1, extend = 0
)
generates array equivalent to trend line
drawn from point x0, y0 to point x1, y1. x coordinates are
in bars (zero based)..."
So naturally, I tried:
y0=LastValue<FONT
size=2>(Trough<FONT
size=2>(L<FONT
size=2>,4<FONT
size=2>,2));
y1=LastValue<FONT
size=2>(Trough<FONT
size=2>(L<FONT
size=2>,4<FONT
size=2>,1));
x0=BarIndex<FONT
size=2>()-50<FONT
size=2>;
x1=BarIndex<FONT
size=2>()-10;
Line = LineArray<FONT
size=2>( x0, y0, x1, y1, 0
);
LineArray didn't like that.
Could someone please expand on the differences and
similarities of BarCount and BarIndex()?
How did BarCount arrive at
410?
Thanks,Corey Saxe
Yahoo! Groups Sponsor
ADVERTISEMENT
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.
|