Three Weeks Tight Scan for ThinkorSwim


New member
Looking for a scan for a three week tight scan , each weekly closing price within about 1% of prior weeks (3) close. Thanks in advance

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

I'm not good at scanning was wondering is there away to scan for consolidation at the high and low of the day or the previous day or the week not sure how to setup parameters any help would be thankful.
Since I have a bit more free time today, I looked further into @TheRaptor22 request for a 3 week consolidation scan. I used Mobius consolidation scan and set it to a weekly aggregation and ran scans on the C&P 500, NASDAQ and Russell 2000. No results were obtained.

Next I dropped the aggregation down to a daily timeframe, and only found 1 result on the Russell 2000. Hence this suggests that only 1 out of the universe of stocks out there are in consolidation mode.
I'm still pretty new at trading, but I've already come across the following pattern enough to stick out in my mind:



Seems to occur often, though certainly not exclusively, in biotech stocks, though that may be my personal bias.

Anyway, I want to build a scan for stocks that run flat like this then go parabolic. The trouble is, they often stay flat like this for months before that initial period of agitation. I want to build a scan that flags them after the flatline when they start to flare up, but I'm not sure how to go about it, and would appreciate any assistance to that end. Thanks.
Hi All,

I'm fairly new to TOS and looking for a script to Scan for stocks in consolidation phase for a specific duration (1 week,2 weeks,3 days) before the actual break out happens.

Kindly help or suggest if there are any scripts available for this.

Thanks in advance.
Has anyone been able to formulate a scan for this? Or does anyone know how to? I was also looking for something similar where I can search the weekly closing pricing being within 1% of last week's closing price?
@Optionsguy set aggregation to weekly and it will scan weekly candles.

#Price is within X% max of the Previous Close
#### Change percentvalue to % in decimal format
###  Example .02 is 2%  and .025 is 2.5%
def percentvalue = .01;
#Price is with X of Previous Close
def Prev_close = (close[1]);
def precent_val = Prev_close*percentvalue;
plot scan3 = absvalue(close - Prev_close) is less than or equal to precent_val;
Last edited:
I've been scratching my head trying to create a scan that shows stocks over a 6 or even 10 or 15 day period that don't move much in price. Read an article recently that a 1.5% range is good to find before a big move up, and I've seen this time and time again.
The best bet is maybe to scan for flags on the weekly? I've tried using all the price tools built in to tos I can think of.
looking to build a scanner I could not find one here and can't figure it out on my own. I pretty much want to scan for stocks that have stayed for lets say 1-5% for the past 20-50 days. I can only find a scan that will find stocks greater then ect.. id like to put my own percent change. just want to look for a stock that has stayed steady for awhile and then add a volume change as well so I can find a steady priced stock that might be ready to rise due to volume change. appreciate any help and if there is already a post for this please post a link and sorry I couldn't find it.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
383 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.