Updated

RDX1 --Spike & Base Screener

330
Spike bar = a bar whose close-to-close move is ≥ your % threshold (so +10% vs the prior close; down bars are excluded automatically).
Within last N days = scan each of the last N bars as a candidate spike.
52-wk high = the spike bar's high is the highest high over ~252 trading days (toggleable).
"Stayed inside the move" / didn't undercut = every bar after the spike held above the spike bar's low. I made low-vs-close a toggle since "undercut" can mean either the wick or the close.
Pass = at least one spike bar in the window satisfies all of the above.
Release Notes
updating exit for the second loop
Release Notes
Ensuring the look back is contained within the range specified

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.