Price Percentage Change within Certain Time Period

ptcll96108

New member
Hello, I am trying to create some thinkorswim scans based on Qullamaggie's work. The criteria for one of his setups is this:

  1. A big move higher sometime in the past 1-3 months. This move can be anywhere from 30-100%+ and usually lasts a few days to a few weeks.
  2. An orderly pullback and consolidation with higher lows and tightening range in the consolidation phase.
  3. A range expansion (breakout) out of that consolidation. The consolidation phase is usually 2 weeks to 2 months. During the consolidation the stock price “surfs” the rising 10- and 20-day. and sometimes toe 50-day moving average.
I have already used TTM squeezes to identify consolidations, but I'm trying to write a script for #1. Unfortunately as you know TOS does not have a RS tool or price performance tool as tc or traderview does. I was looking at the study "Price_Change" but this misses what Im trying to accomplish here. It only looks for minimum % change from the close between two specific dates, not ANY minimum price move WITHIN a certain frame. This is critical because I do not want to rule out stocks that maybe have not technically made a 30% move within the past month because they have corrected a certain amount to not fit the criteria. Does that make sense?

For example, if I used the "Price_Change" study to find stocks that have moved a minimum 30% in the past 21 bars on the daily (1 month), it would eliminate stocks that may have moved 30% but corrected practically any meaningful amount to not fit within a 30% move criteria anymore. Well the whole point is looking for stocks that are currently correcting/consolidating after a big move so TOS's basic price change study wont work. I could have it say its moved at least 10-15% amount but that would give me too much noise in my scan. In summary, I just want to look at stocks that have made any kind of 30-100% move within a certain time frame (in Qullamaggie's case, 1 month, 3 month and 6 month time frames) regardless where they are now.

Thanks!
 
Solution
Hello, I am trying to create some thinkorswim scans based on Qullamaggie's work. The criteria for one of his setups is this:

  1. A big move higher sometime in the past 1-3 months. This move can be anywhere from 30-100%+ and usually lasts a few days to a few weeks.
  2. An orderly pullback and consolidation with higher lows and tightening range in the consolidation phase.
  3. A range expansion (breakout) out of that consolidation. The consolidation phase is usually 2 weeks to 2 months. During the consolidation the stock price “surfs” the rising 10- and 20-day. and sometimes toe 50-day moving average.
I have already used TTM squeezes to identify consolidations, but I'm trying to write a script for #1. Unfortunately as you know...
Hello, I am trying to create some thinkorswim scans based on Qullamaggie's work. The criteria for one of his setups is this:

  1. A big move higher sometime in the past 1-3 months. This move can be anywhere from 30-100%+ and usually lasts a few days to a few weeks.
  2. An orderly pullback and consolidation with higher lows and tightening range in the consolidation phase.
  3. A range expansion (breakout) out of that consolidation. The consolidation phase is usually 2 weeks to 2 months. During the consolidation the stock price “surfs” the rising 10- and 20-day. and sometimes toe 50-day moving average.
I have already used TTM squeezes to identify consolidations, but I'm trying to write a script for #1. Unfortunately as you know TOS does not have a RS tool or price performance tool as tc or traderview does. I was looking at the study "Price_Change" but this misses what Im trying to accomplish here. It only looks for minimum % change from the close between two specific dates, not ANY minimum price move WITHIN a certain frame. This is critical because I do not want to rule out stocks that maybe have not technically made a 30% move within the past month because they have corrected a certain amount to not fit the criteria. Does that make sense?

For example, if I used the "Price_Change" study to find stocks that have moved a minimum 30% in the past 21 bars on the daily (1 month), it would eliminate stocks that may have moved 30% but corrected practically any meaningful amount to not fit within a 30% move criteria anymore. Well the whole point is looking for stocks that are currently correcting/consolidating after a big move so TOS's basic price change study wont work. I could have it say its moved at least 10-15% amount but that would give me too much noise in my scan. In summary, I just want to look at stocks that have made any kind of 30-100% move within a certain time frame (in Qullamaggie's case, 1 month, 3 month and 6 month time frames) regardless where they are now.

Thanks!

here is a post to find the biggest gain (from low to high) , within the last x bars, to the current bar.
https://usethinkscript.com/threads/largest-gain-range-since-uptrend.2418/#post-135379

it could be changed to stop at some previous bar
 
Solution

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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