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.
From a blank page to a saved, repeatable scan.
Sign up and open AI Scan Builder — no credit card required.
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.
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.
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.
Click Run. Matching symbols come back in a sortable results table.
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 coming soon. Until then, the six steps and syntax reference on this page cover the same ground in text.
The same reference available in-app — useful whether you edit the AI's draft or write a scan from scratch.
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.
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.
> < >= <= = != — 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.
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.
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]
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.
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.
These are trailing-252-daily-bar calculations, not a per-timeframe series — asking for a Weekly or Monthly version won't work.
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.
crosses_above/crosses_below only make sense on a time series. Fundamentals fields are the latest known value, so use plain comparators (>, <, =) with them.
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.
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.
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.
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.
Yes — the syntax reference above is the same reference available in-app, and anything the AI drafts can be edited by hand before running.
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.
Yes — save any scan by name and re-run it in one click, or turn on scheduling so it re-runs on its own.
Open AI Scan Builder and describe your first scan — no credit card.
Create your free account