Scan Query? Today's Volume (incl.: Ext Hours) is greater than Average Volume(20)

evanevans

Active member
Anybody know, or can lead me in the right direction on how to make sure that my scan query properly switches between taking account for premarket volume during premarket but then during market hours uses regular volume calculation?

I'm trying to find stocks which are trading above their average 20-day volume on the day, including during premarket (and after hours too technically speaking). So, anytime during the day, premarket, market, after hours, the total volume has gone over the average 20-day volume.

Thanks in advance for your help!
 
Last edited:
Check for the option "EXT."

If unchecked, it won't use extended hours.

1685991434002.png
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Thanks, but if I switch from "D" to 5m for example, to be able to enable EXT then my code will be comparing 5m candles instead of the day to day levels. I want to be able to know how much volume has transpired today including EXT(pm/ah) in comparison with the 20D average. In other words, I'm looking for if so far today the volume is a high RVOL of the 20-day average volume.

I'm just currently using the built in "unusual volume" script included with TOS, but I do have enough experience to create custom code etc, but I am not brilliant at ThinkScript (I have to look up everything and can't really put together complex ideas myself).


Code:
#Wizard text: Current bar's
#Wizard input: price
#Wizard input: choice
#Wizard text: at least
#Wizard input: percent
#Wizard text: % from its typical average over
#Wizard input: length
#Wizard text: periods

input price = volume;
input choice = {default increased, decreased};
input percent = 20;
input length = 50;
def avg = average(price, length)[1];
def chg = 100*(price/avg -1);
plot scan;

switch (choice) {
case increased:
    scan = chg >= percent;
case decreased:
    scan = chg <= -percent;
}

Anything you can think of, any ideas, are totally completely appreciated and I thank you in advance for all that you do regardless if you're able to help me or not.

I just want to know if today's volume is greater or less than a multiple, say 1.0 for example of the average. REASON: If volume in premarket is already equalling average 20-day volume then today is likely already a very unusual volume day and by end of day might be 300% RVOL or more. So these are stocks I want to find on my scan.

Thanks
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
357 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

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?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top