#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Options

# scan all stocks "up 50% in 5 days" within a period

dear, want to create a scan to discover stocks [up 50% in 5 days] within past 126 days, anyone can help please

• Options
mod
edited October 2023
The first part is easy:

[group is...] // or whatever universe you choose

and [close > 5 days ago close * 1.5]

"within past 126 days" is not so easy. If the scan engine were a full featured programming language you would write a loop beginning 126 days ago, and step through each subsequent trading day. But the scan engine is meant to look for single events - values crossing a threshold level that constitute a signal to do something. It's not designed for writing reports - which is essentially what your question asks for. The scan engine is meant to answer the question "what happened today", while your question asks "what happened many times over many days".

That's not to say it can't be done.

So, the brute force way to do it manually would be to set the calendar tool back 126 days, run the scan, save the results (if any) to a list, re-set the calendar tool to 125 days, run the scan again, etc.

You could also write a brute force scan, which would be a very long "or" statement:

// begin

[group is...] // or whatever universe you choose

and

[

[126 days ago close > 131 days ago close * 1.5]

or

[125 days ago close > 130 days ago close * 1.5]

or

... etc.

]

// end

Or, you could combine the two approaches - write a scan that looks back just 10 days (ten "or" statements, each statement incrementing the look back values by one day - close, 5 days ago close ; 1 day ago close,6 days ago close; 2, 7; 3, 8; etc.) and then run that 12 or 13 times, choosing the correct calendar offset each time - no offset for the first scan, then 10 days, then 20 days, etc.

There may be an easier way by customizing the parameters of an indicator, but I would have to think about which one.
• Options
✭✭
You could also try and take a swipe at a universe by using a Rate of Change filter. ROC looks at the current price and compares it to the price X periods ago.

Using the Max function with the ROC will help you narrow the picks

Universe and max126 ROC5 > 50

to find the ones within the universe that meet the mimimum requirement of ROC5 > 50

rank by [max(126,ROC(5))] will put them in order by the ROC5.
• Options
mod
edited October 2023
Sounds like that's the one I couldn't think of.

This gets 605 results, including a lot of junk.

[[exchange is NYSE] or [exchange is NASD]]

and [max(126, ROC(5)) > 50]

rank by max(126,ROC(5))

Most are small caps that spike and die, so you will want some kind of filter to keep only those that haven't died. I tried Fast Stoch %K, which tracks where the current price is relative to the range of the look back period (0 is the bottom, 100 is the top; the look back is 126; 50 means current price is in the top half of the look back range). This gets 102 results, mostly those with more recent spikes.

[[exchange is NYSE] or [exchange is NASD]]

and [max(126, ROC(5)) > 50]

and [Fast Stoch %K(126,1) > 50]

rank by max(126,ROC(5))

You could also add a filter for market cap exceeds some level that gets what you are looking for.

The spike doesn't guarantee a continued rise. In fact, if anything it marks a pump and dump. But a small number (probably those that have stayed more or less in a range after a spike that occurred some time ago) may be future winners.
• Options
✭✭
Another nice "feature" with ROC is that you can add an expression or other indicator to it.

and [max(126, ROC(5)) > 50]

is looking at the Price, but it can look at other ROC's as well. You would just a a comma and an indicator after the (5 in this case. So if you wanted to look at Volume change for example.

and [max(126, ROC(5,volume)) > 50]

I like indicators that allow for their use with other indicators. Below is a link to the Syntax of the various indicators on StockCharts. If you see a comma exp (,exp) at the end of a Syntax line, this means that you can add another indicator into the equation.

https://support.stockcharts.com/doku.php?id=scans:indicators#rate_of_change_roc
• Options
thanks so much @markd and @imkwin