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

[amibroker] Using Nasdaq as Filter



PureBytes Links

Trading Reference Links

Anyone could give me a hand with solving this error I get with some 
tickers on the formula below ????

This is the error I´m getting !   I thought this was due to too 
little data, so I added SETBARSREQUIRED but this did not solve the 
thing, I guess because of the filter already included !

I thank you !!!!

Line 14, Column 29:
RankNum = (Price[b]/price[b-62]*2+
Price[b-63]/Price[b-125]+
Price[b-126]/Price[b-188]+
Price[b-189]/Price[b-251])/5;
----------------------------^

Error 7.
Subscript out of range



// QP QRS Calculations
Buy=Sell=Short=Cover=0;
Filter=Status("LastBarInTest") AND BarCount-1 > 252;
SetOption("NoDefaultColumns",False);
SetBarsRequired( 255, 0 ) ;
Price = Close;

// using numbers (faster)
b=BarCount-1;

RankNum = (Price[b]/price[b-62]*2+
Price[b-63]/Price[b-125]+
Price[b-126]/Price[b-188]+
Price[b-189]/Price[b-251])/5;

// using arrays (slower)
RankArray = Price/Ref(Price,-62)*0.4+
Ref(Price,-63)/Ref(Price,-125)*0.2+
Ref(Price,-126)/Ref(Price,-188)*0.2+
Ref(Price,-189)/Ref(Price,-251)*0.2;

AddColumn(RankNum,"RankNum",1.2);
AddColumn(RankArray,"RankArray",1.2);



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