Step-by-Step Guide

How to Use an AI Stock Scanner & Builder

This walks through StashGamma's AI Scan Builder end to end: describing a scan in plain English, reading the syntax the AI drafts, writing it by hand if you'd rather, and saving or scheduling the result. Grounded in the actual query language — not a generic overview.

The Six Steps

From a blank page to a saved, repeatable scan.

1

Create a free account

Sign up and open AI Scan Builder — no credit card required.

2

Describe your scan in plain English

Type what you're looking for — e.g. "profitable small caps with P/E under 15 and rising RSI" — into the description box, or start from a built-in example in the scan library. The AI assistant drafts real query criteria from it.

3

Review the AI-drafted query before running it

The draft appears as an editable query, not a black box — read it over (or tweak it by hand using the syntax reference below) before running anything.

4

Pick your universe

Scope the scan to the S&P 500, Nasdaq-100, Dow 30, or the full symbol universe with the dropdown — it overrides whatever the query itself says.

5

Run it and read the matches

Click Run. Matching symbols come back in a sortable results table.

6

Save it, or schedule it to re-run on its own

Name and save a scan you want to keep — re-run it in one click any time, or turn on scheduling so it re-runs automatically.

Video Walkthrough

Video walkthrough coming soon. Until then, the six steps and syntax reference on this page cover the same ground in text.

Query Syntax Reference

The same reference available in-app — useful whether you edit the AI's draft or write a scan from scratch.

Technical functions

SMA(period) Simple moving average of Close. Periods: 10, 20, 50, 100, 150, 200.

SMA(period, Volume) Simple moving average of Volume, same period set.

EMA(period) Exponential moving average of Close. Periods: 8, 13, 20, 21, 34, 50, 100, 200.

RSI(period) Wilder's RSI. Periods: 5, 9, 14, 21. Bare RSI defaults to 14.

ROC(period) Rate of change vs. N bars ago. Periods: 1, 5, 10, 20, 63, 126, 252. Bare ROC defaults to 1.

MACD / MACDSignal / MACDHistogram Standard 12/26/9 MACD, no period.

Close / Open / High / Low / Volume / DollarVolume Raw values, no period. DollarVolume = Close × Volume.

Week52High / Week52Low Trailing 252-bar high/low. Daily only.

ATR(period) Wilder's Average True Range. Periods: 7, 14, 21. Bare ATR defaults to 14. A raw dollar figure, not a normalized percentage — compare two periods (ATR(7) > ATR(21)) for a volatility read that works at any price.

VWAP(period) Rolling volume-weighted average price over the trailing N bars. Periods: 10, 20, 50, 100, 150, 200. Requires an explicit period — no default. A fixed trailing bar count, not session/calendar-anchored.

AVWAPYtd / AVWAP52WLow / AVWAP52WHigh Anchored VWAP, no period, Daily only. Anchored from the start of the current calendar year, or from the day of the trailing 52-week low/high — no arbitrary-date anchoring.

StashConfluence StashGamma's own 0–100 trend + momentum composite, optionally blended with a fundamentals-quality score. Not a textbook indicator.

Only these periods are precomputed nightly so a scan stays fast across the full symbol universe — a period outside these lists (e.g. SMA(37)) is rejected with an error.

Fundamentals

Valuation PE, ForwardPE, PEG, PB, PS, EVEBITDA

Profitability EPS, EPSGrowthYoY, EPSGrowthQuarterlyYoy, GrossMargin, OperatingMargin, NetMargin, ROE, ROA, ROIC

Growth RevenueGrowthYoY, RevenueGrowth3Y, RevenueGrowth5Y, RevenueGrowthQuarterlyYoy

Financial health DebtEquity, CurrentRatio, QuickRatio, NetInterestCoverage

Size MarketCap, Beta

Income DividendYield, PayoutRatio, DividendGrowth5Y

Earnings EarningsSurprisePercent, EarningsBeatStreak, EarningsBeatCount4Q (0–4) — EPS beats only, no revenue surprise.

Prefix a condition with Fundamentals instead of a timeframe: [Fundamentals PE < 15]. These are point-in-time snapshot values, not a per-bar series, so crosses_above/crosses_below don't apply to them. Coverage varies by symbol — a symbol with no fundamentals on file won't match, the same way a too-new symbol won't match a 200-day moving average.

Comparators & combinators

> < >= <= = != Standard comparators.

crosses_above / crosses_below Was on the other side on the prior bar, now crossed.

AND OR NOT ( ... ) AND binds tighter than OR — A AND B OR C means (A AND B) OR C. Use parentheses to group explicitly.

Timeframes & universe

Daily / Weekly / Monthly Prefix any technical condition — defaults to Daily if omitted.

[universe = SP500] Also NQ100, DOW30, ALL — one per query, combine with AND. The dropdown overrides whatever the query says.

Example Scans

A sample of the built-in scan library — the full set is browsable in-app.

Momentum

[Daily RSI(14) < 30]
AND [Daily Close > Daily SMA(200)]

Golden cross

[Daily EMA(50) crosses_above Daily EMA(200)]

Value & quality

[Fundamentals PE < 15]
AND [Fundamentals ROE > 10]
AND [Fundamentals DebtEquity < 0.5]

Earnings beat streak

[Fundamentals EarningsBeatStreak >= 3]

Volatility expansion

[Daily ATR(7) > Daily ATR(21)]

Combined signal

[Fundamentals PE < 20]
AND [Daily Close >= Daily Week52High]

Five things that trip people up

ATR is a dollar figure, not a percentage

A bare ATR(14) > 2 means very different things for a $10 stock and a $500 stock. Compare two periods instead — ATR(7) > ATR(21) — for a volatility-expansion read that works at any price.

VWAP always needs a period

Unlike RSI or ROC, VWAP(period) has no default — a bare VWAP is rejected. It's also a fixed trailing-bar window, not anchored to today's session open.

Week52High/Low and anchored VWAP are Daily only

These are trailing-252-daily-bar calculations, not a per-timeframe series — asking for a Weekly or Monthly version won't work.

Periods are limited to a precomputed list

Only specific periods (e.g. SMA: 10/20/50/100/150/200) are precomputed nightly. A period outside that list, like SMA(37), is rejected with an error rather than silently rounded.

Fundamentals conditions have no history — they're a snapshot

crosses_above/crosses_below only make sense on a time series. Fundamentals fields are the latest known value, so use plain comparators (>, <, =) with them.

Frequently Asked Questions

Do I need to learn a query language to use it?

No — describe what you want in plain English (e.g. "profitable small caps with P/E under 15 and rising RSI") and the built-in AI assistant drafts the actual scan criteria for you, in StashGamma's own DSL. You can run it as-is or edit it by hand once you know the syntax above.

How long does the AI take to draft a scan?

Typically well under a minute. It runs on a self-hosted small language model, not a general-purpose chatbot, so translation time can vary with server load.

What can I actually screen by?

Technical indicators (moving averages, RSI, MACD, ROC, ATR, VWAP, anchored VWAP, 52-week high/low) on Daily, Weekly, or Monthly bars, plus company fundamentals (valuation, profitability, growth, financial health, size, dividends, and earnings beat history) — combinable in one query with AND/OR/NOT.

What's the difference between this guide and the Scanner/Screener pages?

Same underlying engine (AI Scan Builder). The Scanner and Screener pages pitch the feature; this page is the instructional walkthrough — the actual steps, the query syntax reference, and common gotchas.

Can I write the query myself instead of using the AI?

Yes — the syntax reference above is the same reference available in-app, and anything the AI drafts can be edited by hand before running.

What universes can I scan?

S&P 500, Nasdaq-100, Dow 30, or the full symbol universe — set with a dropdown, or with [universe = SP500] (also NQ100, DOW30, ALL) directly in the query.

Can I save a scan or run it automatically?

Yes — save any scan by name and re-run it in one click, or turn on scheduling so it re-runs on its own.

Ready to build one?

Open AI Scan Builder and describe your first scan — no credit card.

Create your free account