Saturday, April 25, 2015

thinkscript included: sdi_advmLabel - average dollar volume in millions label

some people claim you should select only stocks that trade a million shares a day. however, there are plenty of penny-stocks that trade a million shares for which it is prudent to stay away from. also, there are worthwhile high priced stocks that trade fewer than a million shares. it is my contention that this million-share selection criterion is an approximation for average dollar-volume (adv) or the average price multiplied by the average share-volume. so i wrote a chart label that displays this value. here's what this looks like:
spy with sdi_advmLabel
the 'M' in the label stands for millions. so the spy etf represents how 20 billion dollars changes hands per day, on average, over the last 20 days. if you use a $10 price minimum in conjunction with the 1million share criterion then what you are really looking for is a stock that has an average-dollar-volume of 10 million, so why not just look for that?

here's the code:


################################
# sdi_advmLabel
input length=20;
#hint: Displays the average dollar volume exchanging hands on the underlying in units of millions of dollars. rev: 1.0.0 http://www.smallDogInvestor.com 
# author: allen everhart
# date: 25apr2015
plot labelColor=double.NaN;
labelColor.hideTitle();
#hint length: Number of bars to use in averages. rev: 1.0.0 http://www.smallDogInvestor.com
labelColor.sethiding();
# copylefts reserved. This is free software. That means you are free
# to use or modify it for your own usage but not for resale or reprinting. 
# Help me get the word out about my blog by keeping notices of origin in place.
labelColor.setDefaultColor(color.BLUE);
addlabel(1, concat("ADVM=", 
    round(SimpleMovingAvg(price = VOLUME, length = length)*SimpleMovingAvg(length = length)/1000000,1)),
    labelColor.takeValueColor()

);

4 comments:

  1. Thank you! Very nice indicator. Do you know how to incorporate it into a scan? I'm looking for a more dynamic small cap scanner that has average dollar volume over $100k.

    ReplyDelete
    Replies
    1. You will need to add a custom study filter to stock hacker. Click on the 'edit thinkscript' tab and input:

      SimpleMovingAvg(price = VOLUME, length = 20)*SimpleMovingAvg(length = 20) > 100000

      Delete
    2. Thanks so much! It works perfect. Love your blog. Thank you for everything.

      Delete
    3. Nice indicator! I am curious if there is a way to scan for the day's trades on TOS? If so, how would you do it?

      Delete