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 
# author: allen everhart
# date: 25apr2015
plot labelColor=double.NaN;
#hint length: Number of bars to use in averages. rev: 1.0.0
# 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.
addlabel(1, concat("ADVM=", 
    round(SimpleMovingAvg(price = VOLUME, length = length)*SimpleMovingAvg(length = length)/1000000,1)),



  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.

    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

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

    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?

  2. Hey! I am wondering the same thing as "wewalandfart". Is there a way to scan for the trades made in a day?

    1. The TOS scanner only supports aggregations based on time. In the TOS charting package one can display aggregations based on trade-counts called tick aggregations. From these tick aggregated charts one could develop indicators that display statistics about trade counts.


Note: Only a member of this blog may post a comment.