Scanner for stocks showing Tight CPR in daily and weekly timeframes

ncn37

New member
VIP
Hi,

I am looking to create a scanner to determine the stocks which will have a Tight CPR and hence possibility of stronger momentum for moving up/down the next day. Also, I am looking for a similar scanner that could give the same outcome but in a weekly timeframe.

I have gone through the Frank Ochoa book and would like to give it a try. But I would like to bit smart about it and not go hunting blind :)

Here's a very basic code I have written till now for the daily timeframe:

Code:
#Tight CPR
#ncn37
def agg = AggregationPeriod.DAY;
def hi = high(period =agg)[1];
def lo = low(period =agg)[1];
def cl = close(period =agg)[1];
def Pivot = (hi + cl + lo)/3;
def BC = (hi + lo)/2;
def TC = 2*Pivot - BC;

def R1 = 2*Pivot - lo;
def R2 = Pivot + (hi - lo);
def R3 = R1 + (hi - lo);
def R4 = R3 + (R2 - R1);

def S1 = 2*Pivot - hi;
def S2 = Pivot - (hi - lo);
def S3 = S1 - (hi - lo);
def S4 = S3 - (S1 - S2);

plot H = high(period = agg);
plot C = close(period = agg);
plot L = low(period = agg);
plot PP = Pivot;
plot Pupp = TC;
plot Pdn = BC;
plot sup1 = S1;
plot sup2 = S2;
plot sup3 = S3;
plot sup4 = S4;
plot res1 = R1;
plot res2 = R2;
plot res3 = R3;
plot res4 = R4;

how do i add this to be able to scan the stocks in tos scanner?
Note to Admins: Apologies if this question has been asked before. If that be the case, please point me to the link of those resources.
 
Last edited by a moderator:
Solution
Hi,

I am looking to create a scanner to determine the stocks which will have a Tight CPR and hence possibility of stronger momentum for moving up/down the next day. Also, I am looking for a similar scanner that could give the same outcome but in a weekly timeframe.
ToS platform does not support the use of aggregations in the scan hacker. Remove the aggregation scripting from your study and you will be able to scan for any of your plotted lines
Scanner Tutorial: https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/
Hi,

I am looking to create a scanner to determine the stocks which will have a Tight CPR and hence possibility of stronger momentum for moving up/down the next day. Also, I am looking for a similar scanner that could give the same outcome but in a weekly timeframe.
ToS platform does not support the use of aggregations in the scan hacker. Remove the aggregation scripting from your study and you will be able to scan for any of your plotted lines
Scanner Tutorial: https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/
 
Solution

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
408 Online
Create Post

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