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

RE: [amibroker] Re: Relative Strength



PureBytes Links

Trading Reference Links

Hi Jason

 

I trade the ASX.  I don’t believe Quotes Plus has ASX data.

 

Regards

 

Dave

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Jason Hart
Sent: Friday, 23 September 2005 11:30 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Relative Strength

 

Dave,

 

I believe someone already mentioned this, but I'm telling you save yourself the aggravation and sign up for Quotes Plus.  They have a free trial so you can experiment with their RS rankings and see if it is to your liking.  You can easily create RS scans using this data

 

Jason

David Weir <dpweir@xxxxxxxxxx> wrote:

In regards to the ranking question like CANLSIM, I was thinking a
faster way and the same result as doing this, is that you don't really
need to know the individual ranking number of the stock, but that its
RS value is above the calculated upper percentile value - say 80%

So instead of individually ranking, it may be more efficient to,

1. An array of all the RS values of all the stocks in a watchlist
2. Work out a percentile 80% value of the array above.
3. Filter stocks > percentile 80% value.

I have not the first clue on how to program this.  Any takers ? =)

Regards

Dave


> Dave,
> Thanks kindly for your input. I'm not sure if what was posted on the
> board is correct as I am not on th eamil list. At any rate it appears
> we both are after something similar to IBD Relative Strength. Dickie
> gave me some help on this and I was able to develope the following
> Exploration:
> //Relative Strength Momentum//
>
> Cond1 = (Close/Ref(Close, -5)) * 0.4;
> Cond2 = (Ref(Close, -6)/Ref(Close, -10)) * 0.2;
> Cond3 = (Ref(Close, -11)/Ref(Close, -20)) * 0.2;
> Cond4 = (Ref(Close, -21)/Ref(Close, -30)) * 0.2;
> Cond5 = (Ref(Close, -31)/Ref(Close, -50)) * 0.2;
>
> Buy = Cond1 + Cond2 + Cond3 + Cond4 + Cond5 >1.25;
> Sell = Cond1 + Cond2 + Cond3 + Cond4 + Cond5 <.50;
>
> Filter = C>0;
>
> Result = WriteIf(Buy,"Buy","Sell");
> AddTextColumn(Result,"Trade",
> formatChar,IIf(Buy,colorDarkGreen,colorRed ),
> IIf(Sell,colorPink,colorLime));
> AddColumn( Close, "Close " );
> AddColumn( Cond1, "Cond1 " );
> AddColumn( Cond2, "cond2 " );
> AddColumn( Cond3, "Cond3 " );
> AddColumn( Cond4, "Cond4 " );
> AddColumn( Cond5, "Cond5 " );
> AddColumn( Cond1+Cond2+Cond3+Cond4+Cond5, "TOTAL " );
>
> Joe Landry also responed and said Quotes Plus had a similar ranking
as
> IBD and started to write some code on this but had to drop it as
> hurricane is approaching Houston area ...
>
> Dick - Best I could do in 15 minutes.  Here's how I think QRS is
> calculated and compared with QRS stored in QP3.  I ran it against
NDX.
>  
> Note the results compare so-so.  They range from high to low in
> roughly the same order.
> AAPL but some scatter throughout.  Hope this helps

> JOE
> /*
>
> The formula is :
>
> ( Current Close / Close from 62 trading days ago ) * .4
>
> + ( Close from 63 trading days ago / Close from 125 trading days
ago )
> * .2
>
> + ( Close from 126 trading days ago / Close from 188 trading days ago
> ) * .2
>
> + ( Close from 189 trading days ago / Close from 251 trading days ago
> ) * .2
>
> */
>
> Filter =1;
>
> QRS = .4*C/Nz(Ref(C,-62)) + .2*C/Nz(Ref(C,-125)) +
> .2*C/Nz(Ref(C,-188)) + .2* C/Nz(Ref(C,-251));
>
> QRSQP = GetExtraData("QRS");
>
> AddColumn(QRS,"Calc QRS2");
>
> AddColumn(QRSQP,"QRS from QP3");
>
> Perhaps these two approaches can lead us to something. Let me know
> what you think.
>
> Dick Hoierman
>

>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "dpweir" <dpweir@xxxx> wrote:
> > Sorry the code got mangeled, please see attachment
> >
> >
> >
> > Regards
> >
> > Dave
> >
> >
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> On Behalf
> > Of dpweir
> > Sent: Wednesday, 21 September 2005 6:48 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: RE: [amibroker] Re: Relative Strength
> >
> > Hi Dick
> >
> > I put this together from two existing codes in the Amibroker
> library.  Now
> > this will do a percentile rank, very quickly for 10 symbols.  In
this
> > example I am ranking on the close. 
> >
> > However when I attempted to do a percentile rank on a watchlist
> containing
> > 300 symbols it estimated 4 hours, at which time I cancelled.  I
too am
> > interested in producing something like the IBD relative strength
> ranking,
> > where you filter stocks which are showing higher than something
like 80%
> > percentile ranking.
> >
> > The code provided could probably be majorly improved, however this
is my
> > first attempt.
> >
> > /* PERCENTILE RANK */
> > /* set watchlist , and indicator twice */
> >
> > //Adapted From Count tickers in watchlist function - Anthony
Faragasso
> >
> > listNum=2; // DEFINE WATCHLIST
> >
> > function CountTickersInWatchList( Listnum )
> > {
> > // retrive comma-separated list of symbols in watch list
> > list = GetCategorySymbols( categoryWatchlist, listnum );
> > for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
> > {
> > if( i == 0 ) i = 0;
> > else i = i ;
> > }
> > return i;
> > }
> >
> > // Adapted from Ranking Ticker List - Nenapacwanfr
> > list = GetCategorySymbols( categoryWatchlist, listnum );
> > for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
> > {
> > SetForeign(sym);
> > VarSet("MyInd"+i,Close);   //INDICATOR - DEFINE
> > Rank =1;
> > for( j = 0; ( item = StrExtract( list, j ) ) != ""; j++ )
> > {
> > SetForeign(item);
> > VarSet("ThisInd"+j,Close); //INDICATOR - DEFINE
> > Rank=Rank + IIf( VarGet("MyInd"+i) < VarGet("ThisInd"+j),1,0);
> > RestorePriceArrays();
> > }
> > VarSet("Rank"+i,Rank);
> > }
> > Count=0;
> > BreakLoop = False;
> > for( k = 0; NOT(BreakLoop) &&( ticker = StrExtract( list, k ) ) !=
> ""; k++ )
> > {
> > if(Name()==ticker)
> > Breakloop=True;
> > else
> > Count=Count+1;
> > }
> > Rank = VarGet("Rank"+ Count);
> > PercentRank = (1 - rank/CountTickersInWatchList(Listnum))*100;
> >
> > Filter = 1;
> >
> > AddColumn(RANK,"Rank");
> > AddColumn(CountTickersInWatchList(Listnum),"Total");
> > AddColumn(Close,"Close");
> > AddColumn(PercentRank,"Percentile Rank");
> >
> >
> >
> > Regards
> >
> > Dave
> > 
> >
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> On Behalf
> > Of areehoi
> > Sent: Tuesday, 20 September 2005 12:07 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Relative Strength
> >
> > Jeff,
> > Thanks for your response.  Good idea I'll give it a try and see if
I
> > can't work out some sotr of rarting system.
> >
> > Dick H.
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "JJ" <jparent@xxxx> wrote:
> > > --- In amibroker@xxxxxxxxxxxxxxx, "areehoi" <hoierman@xxxx>
wrote:
> > > >What I'm looking for is a formula
> > > > to calculate the Comparative Relative Strength similar to what
they
> > > > have done.  Then the results would be on a rating scale of 1 to
> 99 so
> > > > they could be sorted by an exploration/scan. This would not
> > > > necessarily have to be on a 12 month basis but 3 or 6 months
would
> > > > work . and, could be compared to an individual index or
industry
> group
> > > > rather than the whole database of stocks.
> > >
> > >
> > > create an exploration to show rate of change over the time
period you
> > > are looking for.  when ranking a group of stocks, you don't need
to
> > > divide by the market; the rank is the same with or without RS. 
the
> > > 1..99 rank values are arbitrary.  they are not needed either. 
you
> > > need to think about the reasons for performing the rank.  do you
want
> > > to buy or sell stocks that have been strong, and then you need to
> > > choose time period or periods.  in the exploration you can have a
> > > column for each time period.  results can be exported to excel
if you
> > > really think it necessary to do a rank value.
> > >
> > > \jeff
> >
> >
> >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> > 
> > Yahoo! Groups Links
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> > 
> > Yahoo! Groups Links
>
>
>
>

--


Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS