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

RE: [amibroker] barssince question



PureBytes Links

Trading Reference Links




Werner 

<FONT face=Arial color=#0000ff 
size=2> You could easily compute a composite of every stock under study 
using addtocomposite. The ratio would be something 
like 
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>x=c/ma(c,21); 
this 
would tell you the ratio of the stocks price to its ma.  You could then 
divide that value by the total number of stocks in the study to give you the 
average, so.....
<FONT face=Arial color=#0000ff 
size=2> 
<FONT 
size=2> 
Buy<FONT color=#282828 
size=2>=0<FONT color=#282828 
size=2>;
AddToComposite<FONT 
color=#282828 size=2>(x,"~My 
composite",<FONT color=#ff00ff 
size=2>"C");<FONT color=#008000 
size=2>//adds X to the close field<FONT color=#0000ff 
size=2>
AddToComposite<FONT 
color=#282828 size=2>(1<FONT 
color=#282828 size=2>,"~My 
composite",<FONT color=#ff00ff 
size=2>"V");<FONT 
color=#008000>//counts stocks
 
Place 
the code in aa, select the watch list of stocks you wish to analyze, set n=1 and 
scan. Your new composite is names ~My Composite. to view it select the stock 
then use this code to plot it...
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial 
color=#0000ff size=2><FONT color=#0000ff 
size=2>plot(<FONT 
color=#000000>C/<FONT 
size=2>V<FONT color=#282828 
size=2>,""<FONT color=#282828 
size=2>,4<FONT color=#282828 
size=2>,1<FONT color=#282828 
size=2>);
<SPAN 
class=898072617-28042004><FONT color=#282828 
size=2> 
<SPAN 
class=898072617-28042004>you can 
also use this as a foreign call to compare an individual stock by 
trying.....
<SPAN 
class=898072617-28042004><FONT 
color=#0000ff> 
<FONT 
color=#282828 size=2> 
x=<FONT 
face=Arial>C/<FONT 
size=2>MA(C<FONT 
face=Arial>,21<FONT color=#282828 
size=2>); 
y=<FONT 
size=2>Foreign("~My 
composite","C/V"<FONT 
color=#282828 size=2>);<FONT 
color=#0000ff size=2>
Plot<FONT color=#282828 
size=2>(x,"Individual Stock"<FONT 
color=#282828 size=2>,5<FONT 
color=#282828 size=2>,1<FONT 
color=#282828 size=2>);
Plot<FONT color=#282828 
size=2>(y,"All Stocks"<FONT 
color=#282828 size=2>,4<FONT 
color=#282828 size=2>,1<FONT 
color=#282828 size=2>);
 
<FONT face=Arial 
color=#0000ff size=2>selecting a stock will produce its own ration in green 
while overlaying the universe in red. You can explore for crossovers or add 
buy/sell plots using the same code. Note to change the Ma period you will need 
ton rerun the composite code and change the look back in IB as 
well.......
<FONT face=Arial 
color=#0000ff size=2> 
 
Regards,Jayson 

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Werner 
  [mailto:WKRAG@xxxxxxxxxxx]Sent: Wednesday, April 28, 2004 12:58 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] RT = 
  Relative TimingGood day,I was wondering if 
  one can reproduce the RT value of VECTORVEST with AB. The RT (Relative 
  Timing) is a simple vector (or array) of Price compared to a 13 day Moving 
  Average. For that I would have to compute the 13 week Moving Average 
  FOR ALL STOCKS in the database, not just for every single stock. Then I 
  could find stocks which are above /below that ALL STOCKS AVERAGE . Can 
  anyone tell me if this is possible? If yes, how to go about it? 
  Thank you.WernerSend 
  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 
  


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 Sponsor


  ADVERTISEMENT 












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