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

[amibroker] Re: Ranking study



PureBytes Links

Trading Reference Links

Glad to hear that !
Sorry for my incomplete code, Andrew is a great scanner.
Sometimes my replies are posted in the middle of everything, I 
apologise for any trouble...
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, harveyhp <harveyhp@xxxx> wrote:
> Thank you Dimitris and Andrew.  That solved the problem.
> HHP
> ===================
> 
> At 01:16 AM 05/12/2003, you wrote:
> >Andrew,
> >Yes, you are right !!
> >This is the force of habit, I always see my Group254 with my 101
> >stocks...
> >Thank you for pointing this out.
> >Dimitris Tsokakis
> >--- In amibroker@xxxxxxxxxxxxxxx, "Andrew" <a.perrin@xxxx> wrote:
> > > Dimitris
> > > I think that in your Title line you have written
> > > ...."naming(254,L1-bar1-1)..... when perhaps your intention
> > > was ...."naming(No,L1-bar1-1)...... otherwise it also needs to 
be
> > > replaced with your GroupNo also.
> > > Always learn so much looking at your code, always inspiring
> > > Andrew
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS"
> > > <TSOKAKIS@xxxx> wrote:
> > > > I open [again] the
> > > > 
> > 
<http://groups.yahoo.com/group/amibroker/message/53597>http://groups.y
ahoo.com/group/amibroker/message/53597
> > > > I copy *from the web* the code, paste it in Indicator builder 
and
> > > hit
> > > > apply.
> > > > It is OK, no problem.
> > > > Check the critical lines
> > > > No=254;// replace 254 with your GroupNo
> > > > N=101;// the population of group254
> > > > If you have your stocks in Group10 and the population of 
Group10
> > > is
> > > > 188 stocks, then your code should have
> > > > No=10;
> > > > N=188;
> > > > I run 4.50.2, Dec1,2003
> > > > Dimitris Tsokakis
> > > > --- In amibroker@xxxxxxxxxxxxxxx, harveyhp <harveyhp@xxxx> 
wrote:
> > > > > I get the same result as Eric: "Variable 'n1' used without
> >being
> > > > > initialized".  There is no wrapping problem that I can see.
> >The
> > > > coding is
> > > > > far over my head too, but shouldn't the curly brackets
> >alternate
> > > in
> > > > > direction?  Or could it result from not using the latest 
Beta
> > > > version?
> > > > > HHP
> > > > > =================
> > > > >
> > > > > At 09:01 AM 04/12/2003, you wrote:
> > > > > >Thanks for taking a crack at this Dimitris. This code is 
way
> > > over
> > > > my
> > > > > >head. In my dazed and confused state, I'm getting an error 
when
> > > > > >checking: "Variable 'n1' used without being initialized." I
> > > thought
> > > > > >n1 was initialized as "n1=sym;"??
> > > > > >
> > > > > >-Eric.
> > > > > >
> > > > > >--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS"
> > > > > ><TSOKAKIS@xxxx> wrote:
> > > > > > > Eric,
> > > > > > > here is another approach for the top5 RSI of a database:
> > > > > > >
> > > > > > > function naming( listnum,ORdNo )
> > > > > > > {
> > > > > > > list = GetCategorySymbols( categoryGroup, listnum );
> > > > > > > for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
> > > > > > > {
> > > > > > > if(i==ORdno)
> > > > > > > {
> > > > > > > n1=sym;
> > > > > > > }
> > > > > > > }
> > > > > > > return n1 ;
> > > > > > > }
> > > > > > > function select( listnum )
> > > > > > > {
> > > > > > > list = GetCategorySymbols( categoryGroup, listnum );
> > > > > > > Rank = 0;
> > > > > > > for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
> > > > > > > {
> > > > > > > SetForeign(SYM,True,True);
> > > > > > > E1=RSI();
> > > > > > > f=LastValue(E1);
> > > > > > > Rank[BarCount-1-i] = f[i];
> > > > > > > }
> > > > > > > return Rank ;
> > > > > > > }
> > > > > > > No=254;// replace 254 with your GroupNo
> > > > > > > R= Select(No);
> > > > > > > H0=Select(No);G=0;
> > > > > > > Plot(H0,"",2,2);
> > > > > > > G0=0;
> > > > > > > L1=LastValue(Cum(1));
> > > > > > > N=101;// the population of group254
> > > > > > > TOP=5;
> > > > > > > Counter=0;Title="Top"+WriteVal(top,1.0)+" RSI()"+"\n";
> > > > > > > for(K=1;K<=TOP;K++)
> > > > > > > {
> > > > > > > H1=LastValue(HHV(H0,n));
> > > > > > > BAR1=LastValue((ValueWhen(H0==H1,Cum(1)-1)));
> > > > > > > H0[BAR1]=-100000;
> > > > > > > Counter=Counter+1;
> > > > > > > G0[L1-CountER]=-H1;
> > > > > > > shape=33+2*((Counter-1)%10);
> > > > > > > PlotShapes((Cum(1)==bar1+1)*shape,Counter,0,Graph0,5);
> > > > > > > Title=Title+WriteVal(Counter,1.0)+")"+WriteVal(H1)+ "
> > > > ["+WriteVal
> > > > > >(L1-
> > > > > > > bar1-1,1.0)+"-"+naming(254,L1-bar1-1)+"]"+ "\n";
> > > > > > > }
> > > > > > > Plot((Cum(1)>L1-N)*R,"",(H0==-100000)*6+4,2);
> > > > > > > Plot(0,"",1,1);
> > > > > > >
> > > > > > > I hope it is useful.
> > > > > > > Dimitris Tsokakis
> > > > > > > GraphXSpace=3;
> > > > > > > > > --- In amibroker@xxxxxxxxxxxxxxx, "ericleake"
> > > <eleake@xxxx>
> > > > > >wrote:
> > > > > > > > > > Making my first attempt at a very simple Relative
> > > Strength
> > > > > > > scan.
> > > > > > > > > > Using the ROC function, I'm able to create a RS
> > > number.
> > > > I'm
> > > > > > > also
> > > > > > > > > > able to code a simple moving average qualifier 
for a
> > > buy
> > > > > > > signal,
> > > > > > > > > as
> > > > > > > > > > well as an exit.
> > > > > > > > > >
> > > > > > > > > > What approach should I use then to rank the
> >securities
> > > by
> > > > > >their
> > > > > > > > > new
> > > > > > > > > > RS number, and buy say the top 5? Would the new
> > > Percentile
> > > > > > > > > function
> > > > > > > > > > be the way to handle this? Here is what I have so 
far:
> > > > > > > > > >
> > > > > > > > > > Filter = GroupID() == 0;
> > > > > > > > > >
> > > > > > > > > > RS = ROC(Close, 120);
> > > > > > > > > > Avg = EMA(Close, 28);
> > > > > > > > > >
> > > > > > > > > > Exit = Close < Avg;
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > NumColumns = 3;
> > > > > > > > > > Column0Name = "RS Index";
> > > > > > > > > > Column0     = RS;
> > > > > > > > > >
> > > > > > > > > > Any help would be appreciated!
> > > > > > > > > >
> > > > > > > > > > -Eric.
> > > > > >
> > > > > >
> > > > > >Yahoo! Groups Sponsor
> > > > > >ADVERTISEMENT
> > > > >
> > > >
> > >
> > 
><<http://rd.yahoo.com/SIG=12cd6ci97/M=267637.4116730.5333196.1261774/
>htt 
> > p://rd.yahoo.com/SIG=12cd6ci97/M=267637.4116730.5333196.1261774/
> > > D
> > > >
> > >
> 
>=egroupweb/S=1705632198:HM/EXP=1070643720/A=1853619/R=0/*<http://www.
n>http://www.n
> > > e
> > > > tflix.com/Default?mqso=60178356&partid=4116730>
> > > > > >click here
> > > > > >
> > > > > >[]
> > > > > >
> > > > > >
> > > > > >Send BUG REPORTS to bugs@xxxx
> > > > > >Send SUGGESTIONS to suggest@xxxx
> > > > > >-----------------------------------------
> > > > > >Post AmiQuote-related messages ONLY to:
> >amiquote@xxxxxxxxxxxxxxx
> > > > > >(Web page:
> > > > > ><<http://groups.yahoo.com/group/amiquote/messages/)
>http://groups.y 
> > ahoo.com/group/amiquote/messages/)
> > > > >http://groups.yahoo.com/group/amiquote/messages/)
> > > > > >--------------------------------------------
> > > > > >Check group FAQ at:
> > > > >
> > > >
> > >
> > 
><<http://groups.yahoo.com/group/amibroker/files/groupfaq.html>http://
grou 
> > ps.yahoo.com/group/amibroker/files/groupfaq.html>http://
> > > g
> > > > roups.yahoo.com/group/amibroker/files/groupfaq.html
> > > > > >
> > > > > >
> > > > > >Your use of Yahoo! Groups is subject to the
> > > > > 
><<http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/term 
> > s/>Yahoo! Terms of Service.
> >
> >
> >Yahoo! Groups Sponsor
> >ADVERTISEMENT
> 
><http://rd.yahoo.com/SIG=12cjoebq7/M=267637.4116732.5333197.1261774/D
=egroupweb/S=1705632198:HM/EXP=1070702224/A=1853618/R=0/*http://www.ne
tflix.com/Default?mqso=60178338&partid=4116732>
> >click here
> >
> >[]
> >
> >
> >Send BUG REPORTS to bugs@xxxx
> >Send SUGGESTIONS to suggest@xxxx
> >-----------------------------------------
> >Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> >(Web page: 
> ><http://groups.yahoo.com/group/amiquote/messages/)
>http://groups.yahoo.com/group/amiquote/messages/)
> >--------------------------------------------
> >Check group FAQ at: 
> 
><http://groups.yahoo.com/group/amibroker/files/groupfaq.html>http://g
roups.yahoo.com/group/amibroker/files/groupfaq.html 
> >
> >
> >Your use of Yahoo! Groups is subject to the 
> ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.


------------------------ 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/