PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>BarCount ( 1 based ) end one count higher than the BarIndex() ( 0
based ), and your statment in the loop filled all elements of the PHigh array
with a single element of High (you forgot the subscript for
PHigh).
<FONT face=Arial color=#0000ff
size=2>
Range = <FONT
color=#ff00ff>20<FONT
color=#000000>; PHigh=<FONT
color=#ff0000>High<FONT
face=Arial>; StartDate = <FONT
color=#ff0000>BarCount-Range-<FONT
color=#ff00ff>1<FONT
color=#000000>; EndDate = <FONT
color=#ff0000>BarCount-<FONT
color=#ff00ff>1<FONT
color=#000000>; <FONT
color=#ff0000>for<FONT
color=#000000>(i = StartDate; i < EndDate; i++) {
PHigh[i]
= High<FONT
color=#000000>[i]; }
<FONT face=Arial
size=2>Good luck,
<FONT face=Arial
size=2>herman
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Tahoma
size=2>-----Original Message-----From: billbarack
[mailto:wbarack@xxxxxxxxxxx]Sent: January 28, 2004 4:24
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] For
loop helpCan anyone find out why I'm getting a "Error
7 Subscript out of Range" error statement on the following
code?Range = 20;EndDate = LastValue(BarIndex());StartDate =
EndDate - Range + 1;for(i = StartDate; i < EndDate + 1; i = i +
1){ PHigh
= High[i];}I've tried everything I could think of to understand
this (even reading and re-reading the help files :>) ). These
senior moments are starting to happen far to often for me
!Thanks,BillSend BUG REPORTS to
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
To visit your group on the web, go to:<A
href="">http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:<A
href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
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
Yahoo! Groups Sponsor
ADVERTISEMENT
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 the Yahoo! Terms of Service.
|