# Unusual Volume For ThinkOrSwim

@crawford5002 you would have to post the code of that script in order for use to assist you

Here it goes you can use this to make that a column:

Code:
``````# Show total volume in gray. Buying volume in green. Sell Volume in red.
# Volume average is gray line.
# Specified percent over average volume is cyan triangles.
# Horserider 12/30/2019 derived from some already existing studies.
declare lower;
#Inputs
input Show30DayAvg = yes;
input ShowTodayVolume = yes;
input ShowPercentOf30DayAvg = yes;
input UnusualVolumePercent = 200;
input Show30BarAvg = yes;
input ShowCurrentBar = yes;
input ShowPercentOf30BarAvg = yes;
input ShowSellVolumePercent = yes;
def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def selling = V*(H-C)/(H-L);
# Selling Volume
def SellVol = selling;
# Total Volume
# Note that Selling + Buying Volume = Volume.
def TV = volume;
#Volume Data
def volLast30DayAvg = (volume(period = "DAY")[1] + volume(period = "DAY")[2] + volume(period = "DAY")[3] + volume(period = "DAY")[4] + volume(period = "DAY")[5] + volume(period = "DAY")[6] + volume(period = "DAY")[7] + volume(period = "DAY")[8] + volume(period = "DAY")[9] + volume(period = "DAY")[10] + volume(period = "DAY")[11] + volume(period = "DAY")[12] + volume(period = "DAY")[13] + volume(period = "DAY")[14] + volume(period = "DAY")[15] + volume(period = "DAY")[16] + volume(period = "DAY")[17] + volume(period = "DAY")[18] + volume(period = "DAY")[19] + volume(period = "DAY")[20] + volume(period = "DAY")[21] + volume(period = "DAY")[22] + volume(period = "DAY")[23] + volume(period = "DAY")[24] + volume(period = "DAY")[25] + volume(period = "DAY")[26] + volume(period = "DAY")[27] + volume(period = "DAY")[28] + volume(period = "DAY")[29] + volume(period = "DAY")[30]) / 30;
def today = volume(period = "DAY");
def percentOf30Day = Round((today / volLast30DayAvg) * 100, 0);
def avg30Bars = (volume[1] + volume[2] + volume[3] + volume[4] + volume[5] + volume[6] + volume[7] + volume[8] + volume[9] + volume[10] + volume[11] + volume[12] + volume[13] + volume[14] + volume[15] + volume[16] + volume[17] + volume[18] + volume[19] + volume[20] + volume[21] + volume[22] + volume[23] + volume[24] + volume[25] + volume[26] + volume[27] + volume[28] + volume[29] + volume[30]) / 30;
def curVolume = volume;
def percentOf30Bar = Round((curVolume / avg30Bars) * 100, 0);
def SellVolPercent = Round((Selling / Volume) * 100, 0);
plot scan = percentOf30Bar;``````

@XeoNoX thank you this is awesome, would you also be able to color code it greater than equal to 200 green; 100-199 yellow; less than 100 red?

@crawford5002

Code:
``AssignBackgroundColor( if percentOf30Bar >=200 then color.Dark_GREEN else  if percentOf30Bar >= 100 then color.yellow else  if percentOf30Bar < 100 then color.red else color.black);``

Code:
``AssignBackgroundColor( if percentOf30Bar >=200 then color.Dark_GREEN else  if percentOf30Bar >= 100 then color.yellow else  if percentOf30Bar < 100 then color.red else color.black);``
Beautiful thank you

I'm still learning thinkscript, but it doesn't seem like just posting the script that was posted on thread#1 will scan for any code. From what I've been learning so far, it seems like there has to be a single variable (either increasing or decreasing) for the scanner to work. Is my understanding correct? If so, does it mean I have to comment out one of the variables (increasing or decreasing)?

I'm still learning thinkscript, but it doesn't seem like just posting the script that was posted on thread#1 will scan for any code. From what I've been learning so far, it seems like there has to be a single variable (either increasing or decreasing) for the scanner to work. Is my understanding correct? If so, does it mean I have to comment out one of the variables (increasing or decreasing)?

Read and reread the first post until you understand all of the steps required... You first create a Study and then reference it from within the scanner... Keep at it and you'll get there...

Looking for a scanner which tells us average volume has been increasing for a stock compare to last 15 days or certain days

Is there a way to build the scanner based on \$volume and trades? Thank you!

I have been looking for a scanner to scan for unusual volume that occurs within the one minute candle. It would be great to run the scanner pre-market, during market and after mark close for volume jumps of 300% or more above the previous fifteen minutes of candle volume. Does anyone know of a scanner code that can accomplish this scan?

I have been looking for a scanner to scan for unusual volume that occurs within the one minute candle. It would be great to run the scanner pre-market, during market and after mark close for volume jumps of 300% or more above the previous fifteen minutes of candle volume. Does anyone know of a scanner code that can accomplish this scan?

Are you looking for something beyond what the Built-In Unusual_Volume scan does...???

Code:
``plot scan = (volume>=24000000 and close/close[1]>=1.04)within 10 bars;``

Let's say I'm doing a scan for the above criteria where a stock's performance on a certain day within the past 10 days must have volume over 24 million and on that day the stock is up 4%. This scan is for ONE DAY within past TEN DAYS.
What is the command that I have to add if I want the to look for this performance to have occurred MORE THAN ONE DAY within past TEN DAYS?

Looking for a strategy and scanner that simulates the pattern in the title.
It basically consists of finding stocks that have a unusual volume on a day, and also a big percent gain. The idea is that it's ending near the high of the day. I would buy just before the market close, and sell right at the market open (the desired result is a gap up ocurring).
So I´d like the scanner to find the unusual volume, big percent gain and ending near high of day, and the strategy to buy at close and sell at open

Last edited:
@rad14733 I've tried plot scan = (volume>=24000000 and close/close[1]>=1.04)within 10 bars is greater than 2; but it don't work. Logical though.
How about Sum(event, past period) >2; ?

Hello, I am fairly new to programming indicators, but I was wondering how one would create a scan that would find stocks that have significantly more volume within the first five minutes in the morning compared to the average first five minute volume. Thanks! I have been making an open range breakout strategy using stocks that are reporting earnings. So far my win rate is between 70%-75% but finding stocks with catalysts/unusual premarket volume is a lot of grind work... Hoping to simplify everything! Id be happy to share my full strategy if anyone can help me out

Hello, I am fairly new to programming indicators, but I was wondering how one would create a scan that would find stocks that have significantly more volume within the first five minutes in the morning compared to the average first five minute volume. Thanks! I have been making an open range breakout strategy using stocks that are reporting earnings. So far my win rate is between 70%-75% but finding stocks with catalysts/unusual premarket volume is a lot of grind work... Hoping to simplify everything! Id be happy to share my full strategy if anyone can help me out
Did you ever get any further on your search?

This is what I would like to display in the watch list column if possible on a 5 min

Hello crawford5002 I wanted to customize the watchlist like you to have the average daily volume, and the cur bar but I cannot find it in the customization setting. Thanks

Hi Ben,

I am looking for a script that scans for unusual buy volume spikes above average, and the price action relative small changes. Detect big money set up their position before a major breakout occurs.

Thanks,
Mike

Last edited by a moderator:

87k+ Posts
418 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?