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

RE: [amibroker] Re: RSI (for Jayson)



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Anthony may have had other reasons for selecting a 250-day lookback, but 
it is just about exactly the number of trading days in a 
year.
<BLOCKQUOTE 
>
  <FONT face="Times New Roman" 
  size=2>-----Original Message-----From: Jayson 
  [mailto:jcasavant@xxxxxxxxxxxx]Sent: Tuesday, March 18, 2003 5:01 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
  Re: RSI
  <SPAN 
  class=266483721-18032003>Anthony,
  <SPAN 
  class=266483721-18032003> 
  I 
  was reviewing your code for the RS comparison and thought perhaps It would be 
  be an interesting study for my Sector Rotation work. It Was, thanks! you may 
  find this variation of use. It provides a visual look at the trend of each 
  reading. For longer term study you may wish to adjust the ref 
  periods....
  <SPAN 
  class=266483721-18032003> 
  <SPAN 
  class=266483721-18032003>Question: You had selected 250 as a look back period. 
  Was this arbitrary or have you done some tests to determine this range to be 
  optimal??  
  <SPAN 
  class=266483721-18032003> 
   
  <FONT 
  face=Arial>file://Relative 
  Comparison %
   <FONT 
  color=#0000ff>
  period = 21;<FONT 
  color=#008000 size=2>//Period of 
  relative Comparison
   <FONT 
  color=#0000ff>
  BaseMarket="~index<FONT 
  size=2>";<FONT color=#008000 
  size=2>//select Base 
  market
   <FONT 
  face=Arial>
  x = Foreign<FONT 
  size=2>(BaseMarket,"C") - <FONT 
  size=2>Ref(Foreign<FONT 
  size=2>(BaseMarket,"C"<FONT 
  color=#282828 size=2><FONT face=Arial 
  color=#0000ff>),-period);
  x = (x / Ref(<FONT 
  size=2>Foreign(BaseMarket,<FONT 
  size=2>"C"),-period)) * <FONT 
  size=2>100<FONT face=Arial 
  color=#0000ff>;
  y = C<FONT 
  color=#0000ff> - <FONT 
  size=2>Ref(<FONT 
  size=2>C<FONT face=Arial 
  color=#0000ff>,-period);
  y = ( y / Ref(<FONT 
  size=2>C<FONT 
  size=2>,-period)) * 100<FONT 
  color=#282828 size=2>;
  rs = y - x;
  <FONT 
  size=2>Filter=1<FONT 
  color=#282828 size=2><FONT face=Arial 
  color=#0000ff>;
   
  AddColumn(RS,<FONT color=#ff00ff 
  size=2>"Today RS%",<FONT 
  color=#ff00ff size=2>1.2,<FONT 
  color=#0000ff size=2>IIf(RS==<FONT 
  color=#ff00ff size=2>0,<FONT 
  color=#000000 size=2>colorBlue<FONT 
  color=#282828 size=2>,IIf<FONT 
  color=#282828 size=2>(rs>Ref<FONT 
  color=#282828 size=2>(rs,-1<FONT 
  color=#282828 size=2>),<FONT color=#000000 
  size=2>colorGreen<FONT color=#282828 
  size=2>,colorRed<FONT 
  color=#282828 size=2>)));<FONT color=#0000ff 
  size=2>
  AddColumn(<FONT color=#0000ff 
  size=2>Ref(RS,-<FONT color=#ff00ff 
  size=2>1),<FONT color=#ff00ff 
  size=2>"Yesterday RS%",<FONT 
  color=#ff00ff size=2>1.2,<FONT 
  color=#0000ff size=2>IIf(RS==<FONT 
  color=#ff00ff size=2>0,<FONT 
  color=#000000 size=2>colorBlue<FONT 
  color=#282828 size=2>,IIf<FONT 
  color=#282828 size=2>(Ref<FONT 
  color=#282828 size=2>(rs,-1<FONT 
  color=#282828 size=2>)>=Ref<FONT 
  color=#282828 size=2>(rs,-2<FONT 
  color=#282828 size=2>),<FONT color=#000000 
  size=2>colorGreen<FONT color=#282828 
  size=2>,colorRed<FONT 
  color=#282828 size=2>)));<FONT color=#0000ff 
  size=2>
  AddColumn(<FONT color=#0000ff 
  size=2>Ref(RS,-<FONT color=#ff00ff 
  size=2>2),<FONT color=#ff00ff 
  size=2>"2 days ago",<FONT 
  color=#ff00ff size=2>1.2,<FONT 
  color=#0000ff size=2>IIf(RS==<FONT 
  color=#ff00ff size=2>0,<FONT 
  color=#000000 size=2>colorBlue<FONT 
  color=#282828 size=2>,IIf<FONT 
  color=#282828 size=2>(Ref<FONT 
  color=#282828 size=2>(rs,-2<FONT 
  color=#282828 size=2>)>=Ref<FONT 
  color=#282828 size=2>(rs,-3<FONT 
  color=#282828 size=2>),<FONT color=#000000 
  size=2>colorGreen<FONT color=#282828 
  size=2>,colorRed<FONT 
  color=#282828 size=2>)));<FONT color=#0000ff 
  size=2>
  AddColumn(<FONT color=#0000ff 
  size=2>Ref(rs,-<FONT color=#ff00ff 
  size=2>3),<FONT color=#ff00ff 
  size=2>"3 days ago",<FONT 
  color=#ff00ff size=2>1.2,<FONT 
  color=#0000ff size=2>IIf(RS==<FONT 
  color=#ff00ff size=2>0,<FONT 
  color=#000000 size=2>colorBlue<FONT 
  color=#282828 size=2>,IIf<FONT 
  color=#282828 size=2>(Ref<FONT 
  color=#282828 size=2>(rs,-3<FONT 
  color=#282828 size=2>)>=Ref<FONT 
  color=#282828 size=2>(rs,-4<FONT 
  color=#282828 size=2>),<FONT color=#000000 
  size=2>colorGreen<FONT color=#282828 
  size=2>,colorRed<FONT 
  color=#282828 size=2>)));
   
   Jayson 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Anthony Faragasso 
  [mailto:ajf1111@xxxxxxxx]Sent: Tuesday, March 18, 2003 2:40 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
  Re: RSIHello,Comparative Relative Strength 
  can be useful in deciding which securityto buy, by helping to pinpoint the 
  best performer. They can also beuseful in developing spreads, i.e., 
  purchase of the best performer"long", and selling the weaker issues 
  "short."Steve, if you load the following into AA , select the ndx100 
  andcomponets , n last quotation and n=1,click explore...the results 
  arequite different....also, the RS% value is comparing the ticker 
  to the INDEX, your value issimply a ROC of the Ticker 
  itself.Anthonysteve_almond wrote:>  
  Anthony,>> This works perfectly, as usual. Question is, does 
  this gain anything> over a simple (ROC?) ranking using something 
  like:>> rs=(C-Ref(C,-250))/Ref(C,-250);> 
  Filter=1;> AddColumn(rs,"rs",1.2);>> If I rank all the 
  stocks in the ^NDX using the two methods, the> results are VERY similar 
  (but not EXACTLY the same).>> 
  Steve>>>>> --- In 
  amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx>> 
  wrote:> > Alan,> >> > Here is what I 
  use:> >> > //Relative Comparison %> > period = 
  250;//Period of relative Comparison> > BaseMarket="^ndx";//select 
  Base market> > x = Foreign(BaseMarket,"C") - 
  Ref(Foreign(BaseMarket,"C"),-period);> > x = (x / 
  Ref(Foreign(BaseMarket,"C"),-period)) * 100;> > y = C - 
  Ref(C,-period);> > y = ( y / Ref(C,-period)) * 100;> > rs 
  = y - x;> > Filter=1;> > AddColumn(RS,"RS_%",1.2);> 
  > Anthony> >> > -------Original Message-------> 
  >> > From: amibroker@xxxxxxxxxxxxxxx> > Date: Friday, 
  March 14, 2003 12:50:55> > To: amibroker@xxxxxxxxxxxxxxx> 
  > Subject: [amibroker] RSI> >> > Has anybody developed 
  a formula that calculates and shows the RS of> a> > certain 
  stock compare to list of stocks (such as N100). Something> > similar 
  to RS in Investor Business Daily.> >> > Alan> 
  >> >> > Yahoo! Groups Sponsor> > 
  ADVERTISEMENT> >> >> >> >> > 
  Send BUG REPORTS to bugs@xxxx> > Send SUGGESTIONS to 
  suggest@xxxx> > -----------------------------------------> 
  > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx> 
  > (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)> 
  > --------------------------------------------> > Check group FAQ 
  at:> <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq> 
  > html> >> > Your use of Yahoo! Groups is subject to 
  the Yahoo! Terms of 
  Service.>>>>                    
  Yahoo! Groups 
  Sponsor                        
  ADVERTISEMENT>> Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxx> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx> 
  -----------------------------------------> Post AmiQuote-related 
  messages ONLY to: amiquote@xxxxxxxxxxxxxxx> (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)> 
  --------------------------------------------> Check group FAQ 
  at:> <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html>> 
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
  Service.Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
  Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT









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 the Yahoo! Terms of Service.