# Volume above 500,000 twice in one day .. help w/ scan

#### XeoNoX

##### Expert
VIP
can someone help with scan:

Volume above 500,000 at least THREE times in one day (intraday period)

i can do:

volume > 500000; but dont know how to make it scan for " atleast 3 times in one day"

thanks.

Last edited:
Did you try to set it to the intraday timeframe and extend the within "X" bar value?

i dont know how to write the scan to check "if is true 3 times in one day" ... within x bar value will check the previous day's bars as well which i dont want.

Last edited:
Hmm, now that I think about it. Yeah, it wouldn't work.. I have not done that either.

i know its possible, but im not that good, i cant find that piece of code anywhere online, lol

Looking for the same pattern three times will be difficult at best if you're expecting a scan to produce that result... The TOS scanner has some limitations that contribute to the difficulty...

i know it can be done, using time from beginning and time from end and then set to something along the lines of:

if volume from beginning of time till end of time is over 500000 then 1x.
if from beginning of time to end of time 1x then bar 1x, then if from bar 1x to end of time 1x is true then 2x, if from bar 2x to end of time 1x is true then 3x.
if 3x then TRUE

something like that.

anyone give it a shot?

Just figuring I'd update this, thanks to this I learned how to count with thinkscript.

Volume above 500,000 ATLEAST twice in one day

Code:
``````declare lower;
# ( CUMULATIVE ) COUNT OF THE TOTAL NUMBER TIMES THE SPECIFIED VOLUME GREATER THAN 500,000
# ON THE THE CURRENT DAYS ( TODAYS ) CHART
# By XeoNoX via Usethinkscript.com
def Active = GetDay() == GetLastDay(); #Today
def var = volume>500000;
def cumulative = if Active and !Active[1] then var else if Active then cumulative[1] + var else cumulative[1];
plot scan  = cumulative>=2;
AddLabel (yes, "COUNT " +  (scan), color.dark_green  );``````

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