I suppose if you can predefine stocks within their 5 and 10dma that would be a start. Stockcharts has predefined Continuation Patterns and Doji (Dragonfly & Gravestone) which could indicate a sideways pattern but you'd have to look at the chart to determine how long its been trading that way.
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.