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

Re: [amibroker] Re: Top 200 stocks by volume



PureBytes Links

Trading Reference Links




Dave
to use this AFL, you need to set the APPLY TO -> 
CURRENT STOCK       not <FONT face="Courier New" 
size=3>Filter -> Watchlist -> 1000 stocks.  
For the current stock selected it is best to use a stock with no data holes ( I 
use an INDEX ).  I've copied a snippet of code from the AFL below, this is 
what I tried to explain in first comment.  Under user 
variables are
sWatchlist = 4;  
This is the watchlist you want to scan not write results to.  Set this 
to whatever you mistakenly set the filter to initially.
 Rank_No = <FONT 
color=#ff00ff>200;  This is the depth you want to rank to ie. the 
200th highest rank value will be added to the AddToComposite.<FONT 
color=#008000 size=1>
 
// 
****************************************************************
// APPLY TO - CURRENT STOCK - Set to 
an index (no data holes).
// RANGE - FROM - "set date" TO - 
"set date",
// SCAN or EXPLORE
// 
****************************************************************<FONT 
color=#0000ff>
osInitialize<FONT 
face=Arial size=2>();
#pragma<FONT 
face=Arial size=2> nocache
//#include 
"afl/AP_Functions.afl";
<FONT face=Arial color=#000000 
size=2>//////////////////////////////////////////////////
// User Variables - enter here 
//
<FONT face=Arial color=#000000 
size=2>/////////////////////////////////////////////////
sWatchlist = 4; 
// set to desired 
watchlist.
Rank_No = 1<FONT 
color=#ff00ff>00; // set the depth to rank 
to.
<FONT 
color=#008000> 
 
Hope this Helps,  any problems just 
ask
 
Andrew
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=dcrotty2003@xxxxxxxxxxxx 
  href="">dcrotty2003 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Saturday, December 20, 2003 9:50 
  AM
  Subject: [amibroker] Re: Top 200 stocks 
  by volume
  Hi Andrew, thanks for your reply.Re: Add To 
  Composite RankValue based on Ranking calculation.Using the code in the 
  message you wrote, I believe I could use the composite value as a filter 
  in my systems backtest.I could run the top 200 volume code over each 
  month for the lastcouple of years, setting up watchlists/composites to use 
  in backtesting. Then in my system, add a date function for each of the 
  months composites as a volume filter for backtesting over the 1000 
  stocks.ie:IIf(Year()==2003 AND Month()==11,MA(V,sov1) * Close 
  >= foreign("~Top200Vol_11_2003","C"),IIf(Year()==2003 AND 
  Month()==12,MA(V,sov1) * Close >= 
  foreign("~Top200Vol_12_2003","C"),    ....etc etc 
  etc Nothing's never that easy is it!! ...hoping for a simpler 
  way.Anyway down to business :-) I've downloaded the Osaka plug-in and 
  run the code on a watchlist of 1000 stocks. I get the composite come up 
  with zero and nothing in my watchlist 4. In the AA results all theRank 
  Values are zero.Any idea what I could be doing wrong? I'm selecting 
  Apply to ->Filter -> Watchlist -> 1000 stocks and setting the 
  date to the last months worth. I'm using AB Version 4.5.6 and I guess 
  there's nothingto setup in the Settings?Thanks, 
  Dave--- In amibroker@xxxxxxxxxxxxxxx, "Andrew" 
  <a.perrin@xxxx> wrote:> Dave> Take a look at messages 
  50428 and 50457.  They might be what you want> > 
  Andrew> > --- In amibroker@xxxxxxxxxxxxxxx, "dcrotty2003" 
  <dcrotty2003@xxxx> > wrote:> > Hi Mark, and thanks 
  for the reply.> > > > Sounds a bit tricky, I have no 
  knowledge of JScript.> > > > Would anyone have already 
  coded something similar in JScript that > > Mark suggested and I may 
  be able to modify it.> > > > Otherwise, any other 
  suggestions on how to do it? Thanks.> > > > Dave> 
  > > > --- In amibroker@xxxxxxxxxxxxxxx, "Mark H" 
  <amibroker@xxxx> wrote:> > > I haven't tried that, but 
  based on what I read in the help file, > > you can do an automatic 
  script to accomplish that.> > > > > > 1. load the 
  explore formula and settings> > > 2. invoke the explore> 
  > > 3. save the results to a file> > > 4. read the file and 
  choose the top 200 tickers> > > 5. clear existing 
  watchlist> > > 6. set the 200 tickers to watchlist> > 
  > > > > You can even add the backtest steps:> > > 
  > > > 7. load the backtest formula and settings> > > 
  8. invoke the backtest> > > 9. save the reports to files.> 
  > > > > > All these can be done in JScript. After that, the 
  whole process > is > > just one click away.> > > 
  > > > - Mark H.> > >   ----- Original 
  Message ----- > > >   From: dcrotty2003 > > 
  >   To: amibroker@xxxxxxxxxxxxxxx > > >   
  Sent: Thursday, December 18, 2003 4:51 PM> > >   
  Subject: [amibroker] Top 200 stocks by volume> > > > > 
  > > > >   Hi,> > > > > 
  >   From a newbie EOD trader. Instead of backtesting using todays 
  > > index, > > >   is it possible to create a 
  daily list of 200 only stocks from > a > > list > > 
  >   of 1000 filtered by moving average volume and my system 
  > > backtested on > > >   this list?> 
  > > > > >   I know I could do an explore to pick 
  out the top 200 and save > it > > to a > > 
  >   watchlist then backtest on the list, but I want the list to 
  be > > >   changed everyday within the 
  backtest.> > > > > >   I don't want if 
  using the rank function to only buy top-down > > stocks > 
  > >   with the highest volume but to buy any of the 200 
  selected > stocks.> > > > > >   
  Thanks for any help.> > > > > >   
  DaveSend 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 
  
  
  Yahoo! Groups Links
  
    To visit your group on the web, go to:<A 
    href="">http://groups.yahoo.com/group/amibroker/  

    To unsubscribe from this group, send an email to:<A 
    href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
  


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