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

[amibroker] Database problem



PureBytes Links

Trading Reference Links




<FONT face=Arial 
color=#0000ff size=2>I don't know why.. I'm using the 4.50.10 version - just 
released and it runs on that.
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>I did have to add a filter =1; and a numcolumns = 1; to get 
it to run but I does..
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>I changed the bars in the data base settings down to 1000 
still runs.
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>got me!
<FONT face=Arial 
color=#0000ff size=2> 
<FONT face=Arial 
color=#0000ff size=2>d<FONT face=Arial color=#0000ff 
size=2>


From: billbarack [mailto:wbarack@xxxxxxxxxxx] 
Sent: Tuesday, January 27, 2004 10:21 PMTo: 
amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: For loop 
help
Dimitris, Dingo, Herman, Graham,Thanks for your input. I 
tried everything you suggested. For your info, here is what worked. Adding 
the statement:SetBarsRequired(10000,10000); Made the code run 
without error. What I don't understand now is that the Help file says that 
the SetBarsRequired is not needed if you are running pure AFL code, its only 
needed if you are running scripts or dll's. Does anyone have any comments 
here?The statement:for(i = StartDate; i < EndDate + 1; i = i 
+ 1)works as is. It tells the loop to work up through i=EndDate, but 
stop before i is greater than EndDate + 1. This type of statement is used 
in the help manual.PHigh without the [i] works if you are only going 
to use it as a scalar later. But PHigh[I\i] also works.Dingo, I 
don't understand why the original code worked as-is for you. I am using 
V4.50. Are you using a later beta version?Again, thanks for your 
inputs.Bill--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS 
TSOKAKIS" <TSOKAKIS@xxxx> wrote:> The solution is to add a line 
in the beginning [and change PHigh to > PHigh[i]].> Try 
the> > SetBarsRequired(1000,1000); > Range = 20;> 
EndDate = LastValue(BarIndex());> StartDate = EndDate - Range + 
1;> for(i = StartDate; i < EndDate + 1; i = i + 1)> {> 
PHigh[i] = H[i];> }> Plot(PHIGH,"",1,1);> Dimitris 
Tsokakis> --- In amibroker@xxxxxxxxxxxxxxx, "Graham" 
<gkavanagh@xxxx> wrote:> > EndDate = 
LastValue(BarIndex());> > i < EndDate + 1 which is saying 
LastValue(BarIndex()) +1 > > > > You are specifying the last 
bar past the end of the charts > > The last bar is 
LastValue(BarIndex())> > So use i < EndDate but depending on your 
formula if it looks into > the future> > you may need to move 
the enddate further back with any future look > forwards.> 
> > > You can also replace i=i+1 with just i++> > And you 
may need to have the Phigh as Phigh[i]> > > > > > 
> > Cheers,> > Graham> > <A 
href="">http://www.golala.com/forums/?mforum=asxsharetrading> 
> <A 
href="">http://groups.msn.com/fmsaustralia 
> > > > -----Original Message-----> > From: 
billbarack [mailto:wbarack@xxxx] > > Sent: Wednesday, 28 January 2004 
4:24 AM> > To: amibroker@xxxxxxxxxxxxxxx> > Subject: 
[amibroker] For loop help> > > > > > Can 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,> > > > Bill> > > > > > 
Send BUG REPORTS to bugs@xxxx> > Send SUGGESTIONS to 
suggest@xxxx> > -----------------------------------------> > 
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 Sponsor 
---------------------> ~--> Buy> > Ink Cartridges or 
Refill Kits for your HP, Epson, Canon or Lexmark > Printer> 
> at MyInks.com. Free s/h on orders $50 or more to the US & 
Canada.> > <A 
href="">http://www.c1tracking.com/l.asp?cid=5511> 
> <A 
href="">http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM> 
> 
--------------------------------------------------------------------> 
-~->> > > > 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:> 
> amibroker-unsubscribe@xxxxxxxxxxxxxxx> > > > Your use 
of Yahoo! Groups is subject to:  > <A 
href="">http://docs.yahoo.com/info/terms/Send 
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.