PureBytes Links
Trading Reference Links
|
This is certainly doable this way ... but on my box as written it
takes 50 seconds to run 100 stocks for 100 bars. I can't quite
picture how long it would take to run 10000 stocks for 5000 bars but
it might involve disappearing for a weekend. Beyond this the
question is what to do with the list after you have it.
In PT this can be accomplished with one line of code i.e.
rScore = StockD();
This takes less than 2 seconds to run the same list of stocks over
the same 100 bars and of course incorporates the trading routines and
results reporting for the high ranking stocks.
To each his own.
--- In amibroker@xxxxxxxxxxxxxxx, "Dimitris Tsokakis" <TSOKAKIS@xxxx>
wrote:
> Let us find the top10 of the last 100 Stochd() values.
> In AA explore the current stock for the last 100 bars.
> // The top10 of an exploration
> bars=100;
> H1=StochD()*(LastValue(Cum(1))-Cum(1)<bars);
> H11=H1;
> H2[0]=0;Counter=0;
> top=10;
> for(n=1;n<=top;n++)
> {
> for(i=1;i<BarCount;i++)
> {
> H2=LastValue(Highest(H1));
> if(H1[i]==H2[i])
> {
> if(Counter<top)
> {
> H1[i]=0;
> Counter=Counter+1;
> }
> }
> }
> }
> Filter=1;
> AddColumn(H11,"Array");
> AddColumn((H1==0)*H11,"Top10");
>
> In the "Top10" column you read the 10 highest StochD() values, all
the rest are 0.
> Dimitris Tsokakis
------------------------ 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/l.m7sD/LIdGAA/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/
|