Day Dollar volume scanner


Category:
0
0

Hello Pete,

In trying to refine my scans ( It has been less with your help.), I still have not mastered a scan to filter by the day’s dollar volume. What I mean is a million shares at 1 cents, trades much different than 1 million shares traded at $50.00. The dollar volume is much different.  So this is the code I’ve been kicking around.  Please let me know your thoughts.  Thank you!

# sdi_advmLabel
input length=20;
#hint: Displays the average dollar volume exchanging hands on the underlying in units of millions of dollars.
plot labelColor=double.NaN;
labelColor.hideTitle();
labelColor.setDefaultColor(color.BLUE);
addlabel(1, concat(“ADVM=”,
round(SimpleMovingAvg(price = VOLUME, length = length)*SimpleMovingAvg(length = length)/1000000,1)),
labelColor.takeValueColor

Marked as spam
Posted by (Questions: 6, Answers: 12)
Asked on July 16, 2018 1:09 pm
2061 views
0

This code does not produce a scan. This is not a stock scanner. Are you trying to do a custom watchlist column?

Aside from multiplying total volume times share value, what are you trying to achieve here? Honestly from the math used in your AddLabel() statement I am not sure what you are trying to compute. So what is wrong with using volume times close? And I guess you want the average value, rather than current values?

I’ll get you some solutions once you clarify things a bit more.

( at July 16, 2018 2:32 pm)
0
Hello Pete, I am trying to put together a scan that is based on the dollar volume. Average volume or volume as it is does not determine how liquid the stock because one doesn’t know if it was millions of dollars traded through the day, or a few big dollars in different times of the day. As for the code, I’ve tried to put it together using code from a few Watchlists I have. So in this, I am looking for liquidity in the stocks scanned calculating at least a million shares. Thank you for looking into this.
( at July 16, 2018 3:41 pm)
0
Private answer

Ok, after getting some clarifications I will ignore the code that was provided. I see that you want to compute the total number of dollars traded. Which is simply the number of shares times the current price. The scan will be run on a daily time frame. So you will need to scan after the markets close in order to get the full day’s value. I am providing two types of scans. One for the total gross value and one for the daily average of that value.

def totalDollars = volume * close;
def averageTotalDollars = Average(totalDollars, 20);
# use this to scan for current day total dollars greater than 1 million
plot scan = totalDollars > 1000000;
# use this to scan for 20 day average of total dollars greater than 1 million
#plot scan = averageTotalDollars > 1000000;

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on July 16, 2018 5:34 pm
0

Thank you, Pete.

( at July 16, 2018 5:57 pm)
0

Hi Pete,

I am looking for a code in TOS regarding the dollar volume. I see the code that you have provided above. But will this also work for intraday?
I am looking for a realtime dollar volume or atleast $30,000 dollar volume that I can include in my scanner for intraday.

Looking forward to hear from you.

Thanks

( at October 29, 2018 4:54 pm)
0

The code itself is completely agnostic to the selected time frame. Which means it doesn’t matter what time frame you select. The code will do exactly the same, but the results will be based on the selected time frame.

( at October 29, 2018 5:00 pm)
0
That’s great to know Pete. Just want to clarify. I wasn’t sure if I should I input the whole code. But this is the code I entered in TOS: def totalDollars = volume * close; plot scan = totalDollars > 30000; Or do I need to encode the whole thing that you provided? I just need the dollar volume for the day/realtime for intraday.
( at October 29, 2018 5:53 pm)
0

Should work. Try it.

( at October 29, 2018 8:16 pm)
0
This is cool, Pete, can you provide this code as a chart label and watchlist column, please? I would like not to scan, but calculate the current total number of volume traded in dollars on the day. I will be using this label on the 1 minute chart. This would even be cool if the chart label actually said the amount in ($). The chart label should read = Volume($) Best
( at November 3, 2018 7:19 am)
0

Also in regards to your statement

“Which is simply the number of shares times the current price” i do not believe this will provide accurate results as the price fluctuates throughout the day and even more so on volatile stocks.

Is there a way to calculate total volume traded at each price level (similar to the active trader window) then take the sum in dollars and add them all up for a total daily volume in dollars amount??

( at November 3, 2018 7:42 am)
0

No, in Thinkorswim this data must be aggregated at some level and therefore perfect precision is impossible.

( at November 3, 2018 9:14 am)
0

So shouldn’t the data be aggregated at the final level which is the sum total of all levels used in the calculation?

( at November 3, 2018 11:53 am)
0

Final level? The point is we cannot get an exact figure. It is never going to be exact. It is impossible to do with Thinkorswim. Any solution with Thinkorswim is going to be a ballpark figure. The highest precision for this in Thinkorswim is to compute the volume dollar data for each 1 min bar for an entire day. Then add all those values together to get the current day’s total dollar value. You are still going to lack perfect accuracy.

( at November 3, 2018 12:50 pm)
0
yes, a ballpark figure is perfect that computes the volume and the average price for each 1 minute volume bar and gives a total for all the sums as a chart label
( at November 3, 2018 1:41 pm)
0

Ok, I updated the title of your other post and included the solution there. Here is the new link to your post: https://www.hahn-tech.com/ans/day-dollar-volume-chart-label/

( at November 3, 2018 3:53 pm)