Here's an example I used for a presentation last fall which might give you some ideas.
30 day consolidation scan, narrow range close within +/- 3% of the SMA-20, then breakout above the +5% level
[type is stock] and [1 day ago max (30, close ) <= 1 day ago sma(20, close) * 1.03] and [1 day ago min (30, close ) >= 1 day ago sma(20, close) * .97] and [close > 1 day ago sma(20, close) *1.05]
Note last line could be modified to look for a break in either direction, and [ [close > 1 day ago sma(20, close) *1.05] or [close < 1 day ago sma(20, close) *0.95] ]
hope this gives you some ideas, just adjust the tolerances to fit your needs.
Quasi
I don't work for Stockcharts, I'm just another user always trying to learn more and willing to share what I've already learned. Stockcharts.com Support Forum
Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.