Unusual Volume For ThinkOrSwim

XeoNoX

Well-known member
VIP
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 buying = V*(C-L)/(H-L);
def selling = V*(H-C)/(H-L);
# Selling Volume
def SellVol = selling;
# Total Volume
# Note that Selling + Buying Volume = Volume.
def TV = volume;
def BuyVol = buying;
#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

Well-known member
VIP
@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);
 

dhman06

New member
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)?
 

rad14733

Well-known member
VIP
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...
 

JWC3904

New member
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?
 

rad14733

Well-known member
VIP
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...???

HBOvr9W.png
 

jngy2k

Member
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?
 

Benjaminsabe

New member
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:

Ancelagon

New member
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 :)
 

tsuseven

New member
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?
 

Jun Wu

New member
VIP
ubbED7V.png


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
 

mikemd21

New member
VIP
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
 

stevenchats

Administrative
Staff member
Staff
VIP
Last edited by a moderator:

Similar threads

Top