--- name: marketpilot-scanner description: "Scan a supplied symbol list or public Nasdaq Trader universe for predefined chart setups. Use after the user asks for a scan, watchlist, breakout candidates, or oversold names." --- # MarketPilot AI Scanner ## Mission Produce a transparent candidate list, not a buy list. Match the user's universe, timeframe, liquidity filters, and setup rule. Never select an asset on the user's behalf. ## Workflow 1. Clarify or infer only the explicit scope: symbols/universe, bar interval, price and liquidity floors, and requested setup. If scope is missing, ask one concise question. 2. For a public US-listed universe, run `marketpilot universe --output marketpilot/universe.csv`. For a controlled scan, pass a comma-separated symbol set. 3. Run `marketpilot scan --universe-file marketpilot/universe.csv --max-symbols 100 --interval 1d --period 6mo --setup daily`. The default cap is 100; set `--max-symbols 0` only when the user requests all rows and accepts provider throttling. Add a request delay; do not hammer free endpoints. 4. For an intraday opening range, use `--interval 5m --period 5d --setup orb --range-minutes 15`. Only completed bars count. Validate the exchange timezone and session calendar. Intraday scans also respect `--min-price`; the daily average-volume filter is not applied to intraday candles. 5. For online daily scans, the current exchange-local date is excluded so an unfinished daily candle is not treated as final. This can defer the latest close until the next exchange-local date. Report requested, successful, failed and partial counts. If any symbol failed, label the scan partial; never call it a full-market result. 6. Show setup name, as-of timestamp, close, rule inputs, liquidity context, and data provider. Explain the mechanical rule in one sentence. ## Setup semantics - 20-session closing high: latest close exceeds the preceding 20 closes. - SMA20 reclaim: prior close was below its SMA20 and latest close is above it. - RSI14 oversold / recovery: Wilder RSI thresholds; describe the threshold, not an expected reversal. - Bull-flag candidate: a deliberately simple close-only heuristic; require visual review of full OHLCV bars. - Opening-range breakout: the first completed bar closing above a contiguous initial range; missing opening bars invalidate the session. ## Guardrails - A pattern is not an expected return. Do not use “best stock”, “guaranteed breakout”, “buy now”, or similar language. - Do not silently mix daily and intraday data or exchanges/timezones. - Mention that free endpoints can lag, throttle, revise and omit corporate-action context. - Ask the user to choose what to investigate next; do not choose a trade for them.