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

[amibroker] error message



PureBytes Links

Trading Reference Links

hi,

i got simple code (see below (A)). If I scan this code for the 
current date for buy or sell signals it works fine for certain 
markets (using a market filter) but for the market as a whole it 
stops at some point (at some symbol I suppose).

My question: how do you guys debug such problems. It drives me crazy 
that I can't see what is going on and get some easy output about 
where exactly it fails. The error message by itself rings no bells.

Thanks in advance.

Ed


(A)
#pragma nocache
#include <Perc_Threshold_Long.afl>
#include <Perc_Threshold_Short.afl>

// retracement levels
retr=C;
retr[0]=23.6;
retr[1]=38.2;
retr[2]=50.0;
retr[3]=61.8;
retr[4]=100.0;

for(x=0;x<5;x++) {

	Buy = Perc_Threshold_Long(Close,retr[x]) AND V>100000;
	Sell = Perc_Threshold_Short(Close,retr[x]) AND V>100000;

}




(B)
Line 45, Column 885:
// retracement levels

retr=C;
retr[0]=23.6;
retr[1]=38.2;
------------^

Error 7.
Subscript out of range


------------------------ 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.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/