Previous day's close in compare to current day's high.

PAYtience

New member
VIP
I need help with a scan. Need to identify stocks that are up 10% from previous day's close in compare to current day's high. This is going to be a dynamic scan used with other study and therefore need % difference between previous day close (4:00 PM) and current day high (including premarket).

If someone can please look into this request 🙏

Let me know if you have any questions.
 
Last edited by a moderator:
Solution
I need help with a scan. Need to identify stocks that are up 10% from previous day's close in compare to current day's high. This is going to be a dynamic scan used with other study and therefore need % difference between previous day close (4:00 PM) and current day high (including premarket).

If someone can please look into this request 🙏

Let me know if you have any questions.

Hi PAYtience,

I think this should work. The default is a 10% increase over the previous close, but the number can be adjusted in the inputs.

I did a stock scan with minimum price $10, minimum volume 100,000 shares and CloseIsUp set to true and got 10 hits tonight. Example chart for one of the hits is shown below.

PAYtience-chart-3-31-23.png



Code:
# CloseIsUpXPct
#...
I need help with a scan. Need to identify stocks that are up 10% from previous day's close in compare to current day's high. This is going to be a dynamic scan used with other study and therefore need % difference between previous day close (4:00 PM) and current day high (including premarket).

If someone can please look into this request 🙏

Let me know if you have any questions.

Hi PAYtience,

I think this should work. The default is a 10% increase over the previous close, but the number can be adjusted in the inputs.

I did a stock scan with minimum price $10, minimum volume 100,000 shares and CloseIsUp set to true and got 10 hits tonight. Example chart for one of the hits is shown below.

PAYtience-chart-3-31-23.png



Code:
# CloseIsUpXPct
# question from PAYtience

input price = close;
input pricerise = 0.1;

plot CloseIsUp = close >= (close[1] + (close[1] * pricerise));

CloseIsUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
CloseIsUp.SetDefaultColor(Color.BLUE);
CloseIsUp.SetLineWeight(4);
 
Solution

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

Hi PAYtience,

I think this should work. The default is a 10% increase over the previous close, but the number can be adjusted in the inputs.

I did a stock scan with minimum price $10, minimum volume 100,000 shares and CloseIsUp set to true and got 10 hits tonight. Example chart for one of the hits is shown below.

PAYtience-chart-3-31-23.png



Code:
# CloseIsUpXPct
# question from PAYtience

input price = close;
input pricerise = 0.1;

plot CloseIsUp = close >= (close[1] + (close[1] * pricerise));

CloseIsUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
CloseIsUp.SetDefaultColor(Color.BLUE);
CloseIsUp.SetLineWeight(4);
Hi @traderLK,

Thanks for the reply, was looking for an intraday scan (anything with HOD > 10%) to use it on top of my signals...

I was able to code it out as a scan -

Code:
# bars after close to next day open
def start = 0930;
def end = 1600;
def p1 = (secondsfromTime(end) >= 0 and secondstillTime(2359) > 0);
def p2 = (secondsfromTime(0000) >= 0 and secondstillTime(start) > 0);
def pretime = p1 or p2;

def prehi = if !pretime[1] and pretime then high
  else if pretime and high > prehi[1] then high
  else prehi[1];

def prelo = if !pretime[1] and pretime then low
  else if pretime and low < prelo[1] then low
  else prelo[1];

def high_inc_pre = if IsNaN(dayhi) then prehi else if prehi > dayhi then prehi else dayhi;
#def low_inc_pre = if IsNaN(daylo) then prelo else if prelo < daylo then prelo else daylo;


def PC = close(period = AggregationPeriod.DAY)[1];
def CH = high_inc_pre;
#def CL = low_inc_pre;
def PctChangehigh = (CH - PC) / PC;
#def PctChangelow = (CL - PC) / PC;

plot scan = if PctChangehigh > 0.10 then 1 else 0;
 
Last edited by a moderator:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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