# Compare Intraday Average Volume By Time Period

##### Member
VIP
looking through these unusual volume codes, the one thing I havent been able to find, is a code that shows the average volume percent at the time of day we are looking at, in other words, it takes till end of day or close to end of day to get a volume avg total, I have a code that runs on the hourly and gives its percentage for the particular candle we are trading on and resets at the start of each candle.
Is there a way to have a continues count throughout the day that only resets each morning?

Code:
``````input length = 325;
input unusualvolumepercent = 200;
input showpercentof325houravg = yes;
def Hour = volume;
plot percentof325hour = round(Hour/ average(Hour,length)*100);
percentof325hour.assignvalueColor( (if percentOf325hour >= UnusualVolumePercent then Color.orange else if percentOf325hour >= 100 then Color.green else Color.light_gray) );``````

"avg volume for same time of day"

this would be for the 15m 180d chart
or the 30m 180d

it would be a lower indicator

let's say you're looking at the 10:30am bar for the current day

the indicator would tell you the volume for that candle, and also the average volume for all candles at that same time of day. could plot two bars one skinny one thick on top of one another.

cool way to know how volume is stacking up to the average for different times of day. since there's so much variation in volume btwn open, mid-day lull, and power hour.

since increasing volume can keep a trend going, this would be a good way to judge if volume is increasing relative to the average at the time you're trading.

currently don't have the gas to try and code this but thought i'd put it out there incase anyones bored

I am not a coder but I need help with a script for a scanner with these conditions:

1) after martekt open: 1st 90 min total Volume > the 1st 90 min total volume of the previous day
2) previous day total volume > day prior

Not looking for ATR but total volume increase

This would be the case study

V2= Total Volume for D2 (eg, 3/13)
V1= Total Volume for D1 (eg, 3/12)
X2= Total Volume for first 90 min of trading on D2
X1= Total Volume for first 90 min of trading on D1

X2 > X1 and V2 > V1

Thanks

Last edited by a moderator:

87k+ Posts
341 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?