Skip to content
The query reference

CleverScan syntax

Your idea, written clearly. Combine price, volume, metadata, and technical conditions with AND, OR, and NOT. Parentheses group expressions. Bracket clauses (one condition per […], joined with and/or) also work.

Start in the editor

Open the Screener, choose CleverScan under Scan method and select Edit scan. Start from a featured scan or a template in the Scan Library beside the editor, or type a rule such as the one below. Review each condition, then select Run Scan. The reference below lists the fields, operators and functions you can use.

close > sma50 and volume > avgVol20
New to custom scans? Start with the guide

Bracket clauses put one condition in each […]:

[close > SMA(50,close)]
and [RSI(14) < 45]
and [[exchange is NYSE] or [exchange is NASDAQ]]

Example conditions illustrate the syntax. Choose rules that fit your own research question.

Price and volume

Use open, high, low, close, volume, change, and changePercent. Compare with =, !=, >, >=, <, and <=. Arithmetic supports +, -, *, and /.

symbol IN ["AAPL", "MSFT"] AND close > 100

Indicators

Published indicators include fixed SMA, EMA, RSI, ATR, PctChange, PPOLine, Min, Max, and Ago forms. Moving averages accept both SMA(close, 50) and SMA(50, close). The supported Ago(21, SMA(close, 200)) value reads the average from 21 trading bars earlier, so SMA(close, 200) > Ago(21, SMA(close, 200)) finds rising 200-day averages.

Historical scans

Choose Scan as of before running. The result shows the actual stored trading date used; weekends and holidays use the preceding available session. Leave the date blank to use the latest available data. Share links preserve a selected date.

Prices and indicators use history through that session. Company details use current metadata where indicated.

Read Data & methodology for current metadata and calculation methods.

Save and share

Save expression stores a named query in your account. My Scans, in the Scan Library of the editor, lists it: Select puts it back in the editor and Run Scan runs it. Share creates a public link containing the query and selected date. Backtest Scan selects the stocks that matched on a chosen start date (with Open, on the session before it), keeps that group until the end date and shows each stock's Period Return beside an equal-weight Scan Return. Its setup checks every filter against the start date before Run. Classification filters (exchange, security type, sector, industry, country) and fundamental filters (market cap, P/E, margins, growth, ownership) use today's values, not the values on the start date; the setup and the results name each filter that does. A filter that cannot be evaluated can be deleted from that backtest's query (Undo restores it) while the editor and the saved scan keep the full query.

Understand historical scan results
Make room for better research

Your idea. Your rules.

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

Write a CleverScan rule