Skip to content
Screening workflows 2 min read

How to screen for consolidations and pullbacks

Build a reproducible screen for consolidations and pullbacks: choose a universe, define field units and thresholds, compare presets and inspect the matching daily charts.

Write and combine price, volume, and indicator rules in the CleverScan editor.

Write the selection question, read the exact rule and inspect both matching and excluded cases before saving the screen.

Step 01

Write a selection question

Start by choosing between a sideways range and a retreat inside a trend. A narrow range can occur without a prior advance. A pullback needs a preceding direction and a measured move away from a recent high; the two selections should keep separate labels.

Step 02

Read field units and lookback periods

Range width compares the highest high with the lowest low over 20 sessions. High 108 and low 100 give high ÷ low of 1.08, the default width boundary. The rule also requires close above SMA 50. Distances to averages and highs use percentages rather than dollars.

Step 03

Start from the canonical preset

Open the paired screen and choose the rule below. It includes the reference population as well as the selection conditions. Use the same expression in CleverScan so the learning example and the screen answer the same question.

securityType = "Stock" and indexMembership contains "SP500" and ((1 + hi20FromLowPct / 100) / (1 + hi20FromHighPct / 100) <= 1.08 + 0.000000000001 and close > sma50)
Step 04

Compare another question before combining rules

Compare tight-range and uptrend-pullback presets first. Light volume can be added as another condition, but it does not change a wide pullback into a tight consolidation. Parenthesize alternatives before combining them with a shared trend condition.

securityType = "Stock" and indexMembership contains "SP500" and (close > sma200 and sma50 > sma200 and hi20FromHighPct <= -5 and hi20FromHighPct >= -15)
Step 05

Inspect a match and a boundary exclusion

Inspect the sequence of highs and lows. A low-range statistic does not identify a flag or triangle. A pullback becomes a different research case when the longer-term structure breaks; write that invalidation before studying the subsequent bars.

Change one condition at a time and compare a row just inside the threshold with one just outside it. A zero-match result means the selected population did not meet the whole rule for that session; it is not a reason to silently change the question.

Step 06

Save a reproducible research definition

Save the expression through the editor’s Library workflow. Record the selected session, population and sort so a later run can be compared meaningfully. A saved scan preserves rules, while a watchlist preserves symbols; their results can change independently.

Read the CleverScan syntax reference

Read our data and methodology notes for calculation context. This guide explains research tools and observations. It does not recommend a trade or investment.

Follow your curiosity

One good question leads to another.

All guides
Make room for better research

Put your curiosity to work.

Build a scan with filters or CleverScan rules. Explore the results. Find your next idea.

Write a CleverScan rule