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

[amibroker] Re: Help to calculate hig volume stocks for A/D line



PureBytes Links

Trading Reference Links

Probably no one answered it because it is not a trivial task. You really can't exclude anything until the entire list has been explored. But you can filter the exploration so that only the highest volume stocks are added to the columns. 

1. Get a list of the NYSE stocks.
2. Import them into a watchlist.
3. Initially run the following exploration. Set the "Apply to: to the NYSE watch list and the Range set to a calendar year. Once you create the composite you can run it on the current day.

SetSortColumns(3, -4); 	// sort with largest volume on top
AddColumn(DateNum(), "Date");
AddColumn(V, "Volume");
// the filter excludes stocks with less than 10 Meg volume, indices and composites 
Filter = V > 100000 AND StrLeft(Name(), 1) != "^" AND StrLeft(Name(), 3) != "000" AND StrLeft(Name(), 1) != "~";
// if you use a watchlist with NYSE stocks you can use 
// Filter = V > 100000;

The above will sort the list with the oldest date and the highest volume on top.

4. Copy the entire list into Excel and select the stock volume to sum for the adv and dev stocks in the list. 
5. Make the output a csv file that can be used to import as a composite.  

I said this would be messy. Some problems are that the 40 stocks with the highest volume will change over time. But you only care about the top 40 for your AD so that may not matter. 

Another problem is that I don't know how to automate this so you would have to do this manually for every year at the beginning and then the current day after you have the composite list created. 

Once you have the composite list created all you need to do is plot the data any way you want.

Like I said. Not pretty. 
Barry

--- In amibroker@xxxxxxxxxxxxxxx, "areehoi" <areehoi@xxx> wrote:
>
> I'm sure there is way to do this but I have no earthly idea of How! 
> An article in Futures (June issue page 30) describes an indicator called MAAD -" Most Actives Advance/Decline line". It differs from the conventional A/D line by only includes stocks with the highest volume. In the article it is using only the top 20 high volume stocks. The A/D formula I use scans the entire database. How would one set up a filter (or other way) to "exclude" all but the top 20 (or any other number i.e. 40) highest volume stocks on a daily basis? This would be the numbers used in the calculation. My database goes back 10 years so calculation would be made for that period.  Current (6/27/09 )Advance/Declines for all stocks/ETF's in my Database is:
> 
> Adv = 2672
> Dec = 1694
> NC = 113
> 
> The top 40 in volume (NYSE only) is:
> Adv = 22
> Dec = 16
> NC = 2
> 
> Any help or ideas you have will be most appreciated. Thanks
> 
> Dick H.
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/