# Stratucation 2023 Playlist Guide Source: https://docs.stratalerts.com/2023-stratucation-course Transcript-based notes for Sara's 2023 Stratucation playlist. 17 lesson summaries and key concepts. [Open Complete Playlist](https://www.youtube.com/playlist?list=PLoOwDUfJHOPCvUhRARFX0HjUOgULiyTuy) ## How to Use These Notes 1. Watch lesson -> read summary -> run the practice prompt on real charts. 2. Capture one screenshot per lesson where you can label the exact concept. 3. Do a weekly review and mark which concepts are still unclear. *** ### Lesson 1: Scenarios + Candle Color Covers candle anatomy (open, high, low, close), scenario IDs, and how color is determined. Emphasis: use clean Japanese candles and learn structure before setups. * **Focus skill:** classify candles correctly and fast. * **Practice:** label 50 bars by scenario and direction. [Watch lesson](https://www.youtube.com/watch?v=xIqVZ1tmHpU) *** ### Lesson 2: Full Timeframe Continuity Frames continuity as a control model: identify which side is in charge and align with that side. Priority is not prediction, it is trading with current control. * **Focus skill:** read control vs conflict across frames. * **Practice:** log continuity state each morning for one week. [Watch lesson](https://www.youtube.com/watch?v=O28St2jI8ww) *** ### Lesson 3: Actionable Signals, In Force, Magnitude Introduces setup families, confirms the idea of "in force," and explains why magnitude matters for trade quality. Strong reminder: direction and structure matter more than candle color obsession. * **Focus skill:** identify trigger level and objective level. * **Practice:** mark in-force state on 20 historical setups. [Watch lesson](https://www.youtube.com/watch?v=Ano2Vf1g2gc) *** ### Lesson 4: Stop Losses Treats stops as active defense and management tools, not passive "worst-case" placeholders. Highlights quick feedback entries where trade quality is obvious early. * **Focus skill:** stop placement based on setup invalidation. * **Practice:** compare tight vs loose stop outcomes in replay. [Watch lesson](https://www.youtube.com/watch?v=WqER5nfBe9E) *** ### Lesson 5: Targets, Magnitude, Exhaustion Risk Uses pivots and structural levels to define objectives, then links target interaction to exhaustion behavior. Message: where price has room determines whether setup quality is real. * **Focus skill:** map realistic target path before entry. * **Practice:** tag exhaustion risk on your last 30 trades. [Watch lesson](https://www.youtube.com/watch?v=Ug1ous5mXXc) *** ### Lesson 6: The Flip + Simultaneous Breaks Explains what happens when control shifts quickly, including flip behavior and simultaneous level interactions. Also discusses why certain weekday patterns can matter in context. * **Focus skill:** recognize control handoff conditions. * **Practice:** document 10 flips and how they resolved. [Watch lesson](https://www.youtube.com/watch?v=yWhSyIvltP8) *** ### Lesson 7: Broadening Formations Deep dive on broadening structures, outside-bar behavior, and why edge timing can matter more than center-range chasing. Heavy focus on reversal context and range travel behavior. * **Focus skill:** locate broadening edges and invalidation points. * **Practice:** annotate broadening structures on 15 charts. [Watch lesson](https://www.youtube.com/watch?v=DWhp_asU3Eg) *** ### Lesson 8: Tightening Ranges / Mother Bars Covers the opposite regime: compression. Discusses inside-bar stacking, tightening behavior, and why mother-bar context can confuse entries if not mapped clearly. * **Focus skill:** distinguish clean compression from noisy chop. * **Practice:** collect 20 mother-bar cases and classify outcomes. [Watch lesson](https://www.youtube.com/watch?v=QPeVZSyW4zg) *** ### Lesson 9: Multiple Timeframe Analysis / Domino Effect Shows how higher-timeframe triggers can cascade into lower-timeframe opportunities and risk decisions. Emphasizes sequencing analysis instead of isolated single-frame views. * **Focus skill:** top-down mapping with execution timeframe precision. * **Practice:** build a 3-frame checklist for every setup. [Watch lesson](https://www.youtube.com/watch?v=n52WaalId3I) *** ### Lesson 10: TTO Frames TTO in practical terms: decide whether current move is true reversal behavior or corrective movement. Uses target interaction and exhaustion context to avoid false assumptions. * **Focus skill:** classify reversal vs correction with evidence. * **Practice:** review 25 TTO-like moves and tag final outcome. [Watch lesson](https://www.youtube.com/watch?v=YXhNDAd-vEU) *** ### Lesson 11: Big Picture / Zoom Out Pushes context-first thinking: zoom out enough to understand location, pivots, and structural path, then zoom back in for execution. * **Focus skill:** location awareness before trigger focus. * **Practice:** add weekly/monthly location note to every trade plan. [Watch lesson](https://www.youtube.com/watch?v=KNZXnW8E7P8) *** ### Lesson 12: Risk / Reward Quantifies risk sizing and payoff expectations. Reinforces that position size must follow stop distance, and account risk must remain fixed regardless of confidence. * **Focus skill:** translate setup into R-based decision making. * **Practice:** recalc your last 20 trades into normalized R. [Watch lesson](https://www.youtube.com/watch?v=T9jzudwfSE4) *** ### Lesson 13: Putting It Together Integrates continuity, actionable signals, location, risk, and exhaustion into full setup selection. This lesson is essentially the workflow assembly stage. * **Focus skill:** complete pre-trade workflow in one pass. * **Practice:** run full checklist on 10 candidate setups nightly. [Watch lesson](https://www.youtube.com/watch?v=vDD0bR4bZ5o) *** ### Lesson 14: Gappers Advanced lesson on gap dynamics, gap-fill behavior, and alignment requirements before treating gaps as opportunities. Emphasis on selectivity and context sensitivity. * **Focus skill:** separate high-quality gap context from noise. * **Practice:** journal every gap trade with premarket continuity notes. [Watch lesson](https://www.youtube.com/watch?v=fiE1mMeRkEs) *** ### Lesson 15: Nightly Studying / Top-Down Method Builds the repetition system: nightly review, top-down scanning, and deliberate homework so setup recognition becomes automatic. * **Focus skill:** daily prep and nightly replay discipline. * **Practice:** 30-minute nightly top-down routine for 20 sessions. [Watch lesson](https://www.youtube.com/watch?v=Y8IOcLW1frM) *** ### Lesson 16: TradingView Setup Platform-focused walkthrough for layout, indicators, watchlists, and practical chart workflow. The goal is reducing execution friction. * **Focus skill:** standardize your chart workspace. * **Practice:** create one reproducible chart template and lock it. [Watch lesson](https://www.youtube.com/watch?v=lhvmTt6swxo) *** ### Lesson 17: TrendSpider Setup Companion platform setup covering scanner/workflow configuration so ideas can be found and reviewed faster. Focus is efficiency and consistency in tool use. * **Focus skill:** configure scan and chart defaults for your process. * **Practice:** compare one-week idea quality before/after scanner tuning. [Watch lesson](https://www.youtube.com/watch?v=Rjees132cWo) ## Next Step Use these notes with the live scanner workflow: find setups, confirm control, define risk, then execute with a checklist. # AI Search Queries Source: https://docs.stratalerts.com/ai-tools/ai-search AI Search lets you type plain English Strat queries directly into StratAlerts, which translates them into structured filters instantly. AI Search is the natural language query engine built into the StratAlerts setups table. Instead of manually configuring column filters, you type what you're looking for in plain English — using the same Strat terminology you already think in — and the system translates it into structured filters that update the table immediately. It's designed to let you move fast: a two-second query replaces several clicks of filter configuration. ## Accessing AI Search You can open AI Search from multiple places: * **Wand button** — click the wand icon (✦) next to the gear menu in the Setups Table toolbar. This is the fastest mouse-driven way to open AI Search while you're already working with the table. * **Keyboard shortcut** — press **Q** from anywhere in the app to open the search input immediately. * **Mission Control** — use the AI Search bar on the main overview page. Type your query and press **Enter** — the table filters update in real time. AI Search is part of the StratAlerts app and does not require a separate AI Tools subscription. It runs inside the app and works against the live setups table. ## How it works When you submit a query, StratAlerts parses your natural language input and maps it to structured filter conditions on the setups table. The mapping preserves Strat-specific terminology, so you don't need to translate it yourself. Use Strat terminology naturally — candle types, timeframe names, setup conditions. The parser understands both shorthand (`2U`, `2D`) and expanded forms (`two up`, `inside day`, `in force`). Your query is converted to specific filter conditions: candle type (CC, C1, C2), timeframe, TFC state, in-force status, and similar fields. The translation is shown so you can verify what was applied. The table refreshes to show only the symbols that match your query. From there, you can sort, click into individual symbols, or add additional manual filters. ## Example queries These examples show the query you type and the filter conditions it maps to: **Query:** `all inside days` **Translates to:** CC = `1` on the daily timeframe Returns every symbol currently forming an inside day — a candle contained entirely within the prior candle's range. Useful for identifying coiled setups before a potential directional break. **Query:** `2U weeks in force` **Translates to:** CC = `2U` on Weekly timeframe, In-Force = `true` Returns all symbols where the weekly candle is a 2U that has gone in-force — meaning price has broken above the prior weekly high. **Query:** `1-2U setups on the daily` **Translates to:** C2 = `1`, C1 = `2U` on Daily timeframe Returns symbols showing the classic 1-2U setup pattern: an inside day followed by an up-candle, with the current candle potentially resolving the setup. **Query:** `green C1 on the month` **Translates to:** C1 Color = `green` on Monthly timeframe Returns symbols where the trigger candle closed green. You can also target the target candle with `red C2` or use natural phrases like `green trigger candle` and `red target candle`. When you add a color to a two-part setup sequence like `1-2d green`, the color defaults to C1 unless you explicitly say `C2` or `target candle`. **Query:** `day and week are 2U` **Translates to:** Daily CC = `2U` AND Weekly step CC = `2U` Returns symbols aligned as 2U on both the daily and weekly timeframe — a stronger continuation signal than a single-timeframe 2U. AI Search preserves both timeframe-state filters, so queries like `week and month that are 2u` keep the weekly base filter and the monthly step instead of collapsing to a single timeframe. **Query:** `day in force and week in force` **Translates to:** Daily In-Force = `true` AND Weekly step In-Force = `true` Returns symbols that are in force on both the daily and weekly timeframes simultaneously. AI Search preserves the `in_force` flag inside each multi-timeframe step, so both conditions carry through to the table filters. ## Strat terminology the parser understands AI Search recognizes the core vocabulary of The Strat methodology. You can use these terms directly in your queries: | Term | Meaning | | ------------------------------- | --------------------------------------------------------------- | | `inside`, `inside day`, `1` | Candle 1 — inside candle contained within prior range | | `2U`, `two up`, `up candle` | Candle 2U — up-candle, high above prior high | | `2D`, `two down`, `down candle` | Candle 2D — down-candle, low below prior low | | `outside`, `3`, `broadening` | Candle 3 — outside candle, both high and low exceed prior range | | `failed 2U` | 2U candle that reversed below its own open | | `failed 2D` | 2D candle that reversed above its own open | The parser accepts full names and shorthand: | Accepted terms | Timeframe | | ------------------------------- | --------- | | `15m`, `15 minute`, `15-minute` | 15-minute | | `30m`, `30 minute` | 30-minute | | `60m`, `60 minute`, `hourly` | 60-minute | | `4H`, `4 hour` | 4-hour | | `daily`, `day`, `D` | Daily | | `weekly`, `week`, `W` | Weekly | | `monthly`, `month`, `M` | Monthly | | `quarterly`, `quarter`, `Q` | Quarterly | | `yearly`, `year`, `annual`, `Y` | Yearly | AI Search understands two-part and three-part Strat setup sequences using the standard C2-C1 or C2-C1-CC notation: | Term | Filter applied | | ----------------------------- | ----------------------------------------------------------- | | `1-2U`, `1-2d` | C2 = `1`, C1 = `2U` or `2D` | | `3-2U`, `2D-3` | Directional two-part sequences | | `1-2-2`, `1-2U-2D` | Three-part sequences mapped to C2-C1-CC | | `all 1-2 setups on the month` | Expanded to C2 = `1`, C1 = `2` (both directions) on Monthly | Bare `2` in a sequence is automatically expanded to cover both `2U` and `2D`. Explicit directional sequences like `1-2d` are mapped correctly as setup-sequence filters, not misread as current-candle state. | Term | Filter applied | | ---------------------------------- | -------------------------------------------- | | `green C1`, `green trigger candle` | C1 Color = `green` | | `red C2`, `red target candle` | C2 Color = `red` | | `1-2d green` | Setup = `1-2D`, C1 Color = `green` (default) | | `green C2 on the week` | C2 Color = `green` on Weekly | When a color is attached to a setup sequence without specifying which candle, it defaults to C1. To target C2 instead, explicitly name it. | Term | Condition | | ----------------------------------- | --------------------------------------------- | | `in force`, `in-force`, `triggered` | InForce = true | | `continuation` | Continuation = true | | `P3`, `potential 3` | P3 flag = true | | `PMG`, `potential major gap` | PMG flag = true | | `green TFC`, `bullish TFC` | TFC state = green for the specified timeframe | | `red TFC`, `bearish TFC` | TFC state = red for the specified timeframe | ## Tips for effective queries Be specific about the timeframe. "2U setups" is valid, but "2U setups on the daily" returns a more focused result. If you omit the timeframe, AI Search defaults to the timeframe currently selected in the table. Combine conditions naturally. Phrases like "2U daily with green weekly TFC" or "inside days on the 60 that are in force" work as you'd expect — the parser handles compound conditions. AI Search is designed for standard Strat terminology. Very custom or proprietary terms outside the standard Strat vocabulary may not translate correctly. If a query produces unexpected results, check the filter summary shown below the search bar to see exactly what was applied. ## Related Feed live Strat bundles into GPT, Claude, Gemini, and other LLMs for deeper AI-powered analysis. Detailed field reference for the NDJSON bundle format used with external LLMs. # Bundle Format Source: https://docs.stratalerts.com/ai-tools/bundles Complete reference for the StratAlerts NDJSON market bundle: every field, refresh cadence, how to fetch it with your API key, and Python parsing examples. ## Fields and Fetch Reference The StratAlerts market bundle is a structured snapshot of every tracked symbol delivered as an NDJSON file — one JSON object per line, one line per symbol. It refreshes every 300 seconds (5 minutes), so the data your LLM receives always reflects current market conditions. This page covers the exact bundle format, every available field, how to fetch the bundle, and how to parse it in code. ## File format The bundle is **NDJSON** (Newline-Delimited JSON). Each line is a valid, self-contained JSON object representing one symbol. This format is intentional: it streams efficiently, parses line by line without loading the entire file into memory, and works cleanly as LLM context input. ```text bundle-0001.ndjson theme={null} {"Symbol":"SPY","Sector":"ETF","LastPrice":561.40,...} {"Symbol":"QQQ","Sector":"ETF","LastPrice":477.83,...} {"Symbol":"AAPL","Sector":"Technology","LastPrice":213.57,...} ``` **Refresh cadence:** Every 300 seconds. The bundle URL does not change — the same URL always returns the latest snapshot. ## Fields ### Identity and price | Field | Type | Description | | -------------------- | ----------------- | --------------------------------------------------------------- | | `Symbol` | string | Ticker symbol (e.g., `SPY`, `NQ=F`, `BTC-USD`) | | `Sector` | string | Sector classification (e.g., `Technology`, `Financials`, `ETF`) | | `LastPrice` | number | Most recent trade price | | `LastTradeTimestamp` | string (ISO 8601) | Timestamp of the last trade | | `LastPriceSource` | string | Data source for the last price | ### TFC state Timeframe continuity (TFC) state is provided for five higher timeframes. Each value is one of `green`, `red`, or `na`. | Field | Timeframe | Values | | ------- | --------- | -------------------- | | `TFC_D` | Daily | `green`, `red`, `na` | | `TFC_W` | Weekly | `green`, `red`, `na` | | `TFC_M` | Monthly | `green`, `red`, `na` | | `TFC_Q` | Quarterly | `green`, `red`, `na` | | `TFC_Y` | Yearly | `green`, `red`, `na` | ### Candles (OHLCV) OHLCV bars are included for nine timeframes. Each timeframe block contains: `Time`, `Open`, `High`, `Low`, `Close`, `Volume`. | Timeframe key | Timeframe | | ------------- | --------- | | `Candle_15` | 15-minute | | `Candle_30` | 30-minute | | `Candle_60` | 60-minute | | `Candle_4H` | 4-hour | | `Candle_D` | Daily | | `Candle_W` | Weekly | | `Candle_M` | Monthly | | `Candle_Q` | Quarterly | | `Candle_Y` | Yearly | Each candle object looks like: ```json candle object theme={null} { "Time": "2026-04-10T09:30:00Z", "Open": 558.20, "High": 563.80, "Low": 557.40, "Close": 561.40, "Volume": 42871200 } ``` ### Setup fields Setup fields reflect the current Strat setup state on the daily timeframe by default. | Field | Type | Description | | -------------- | -------------- | ---------------------------------------------------------------------- | | `C2` | string | Candle 2 scenario — the prior candle type (e.g., `1`, `2U`, `2D`, `3`) | | `C1` | string | Candle 1 scenario — the current candle type | | `CC` | string | Current candle scenario | | `SetupTarget` | string | The identified setup target (price level or label) | | `TriggerGreen` | number \| null | Price level that triggers the bullish side of the setup | | `TriggerRed` | number \| null | Price level that triggers the bearish side of the setup | | `Continuation` | boolean | Whether the setup is a continuation setup | | `InForce` | boolean | Whether the setup is currently in-force (trigger has been breached) | | `P3` | boolean | Whether the setup is a P3 (potential 3) | | `PMG` | boolean | Whether a PMG (potential major gap) flag is set | ## Sample bundle row This shows a complete single-symbol row from the bundle: ```json sample row (SPY) theme={null} { "Symbol": "SPY", "Sector": "ETF", "LastPrice": 561.40, "LastTradeTimestamp": "2026-04-10T14:35:22Z", "LastPriceSource": "consolidated", "TFC_D": "green", "TFC_W": "green", "TFC_M": "red", "TFC_Q": "red", "TFC_Y": "green", "Candle_D": { "Time": "2026-04-10T09:30:00Z", "Open": 558.20, "High": 563.80, "Low": 557.40, "Close": 561.40, "Volume": 42871200 }, "Candle_W": { "Time": "2026-04-07T09:30:00Z", "Open": 549.10, "High": 564.90, "Low": 546.30, "Close": 561.40, "Volume": 198450000 }, "C2": "1", "C1": "2U", "CC": "2U", "SetupTarget": "564.90", "TriggerGreen": 563.80, "TriggerRed": 557.40, "Continuation": false, "InForce": false, "P3": false, "PMG": false } ``` ## Fetching the bundle Send an HTTP GET to your bundle URL with your API key in the `X-API-Key` header: ```bash cURL theme={null} curl -H "X-API-Key: YOUR_API_KEY" \ https://app.stratalerts.com/api/v1/bundles/latest.ndjson ``` ```python Python theme={null} import requests response = requests.get( "https://app.stratalerts.com/api/v1/bundles/latest.ndjson", headers={"X-API-Key": "YOUR_API_KEY"}, ) response.raise_for_status() bundle_text = response.text ``` ```javascript JavaScript theme={null} const response = await fetch( "https://app.stratalerts.com/api/v1/bundles/latest.ndjson", { headers: { "X-API-Key": "YOUR_API_KEY" }, } ); const bundleText = await response.text(); ``` Your bundle URL and API key are available in **Account → AI Tools** after subscribing. ## Parsing the bundle in Python This example fetches the bundle, parses every row, and filters for symbols that are in-force on the daily: ```python parse and filter bundle theme={null} import json import requests def fetch_bundle(api_key: str) -> list[dict]: url = "https://app.stratalerts.com/api/v1/bundles/latest.ndjson" response = requests.get(url, headers={"X-API-Key": api_key}) response.raise_for_status() rows = [] for line in response.text.splitlines(): line = line.strip() if line: rows.append(json.loads(line)) return rows def in_force_daily(rows: list[dict]) -> list[dict]: return [r for r in rows if r.get("InForce") is True] rows = fetch_bundle("YOUR_API_KEY") active = in_force_daily(rows) for symbol in active: print(f"{symbol['Symbol']} — {symbol['CC']} — in force at {symbol['TriggerGreen'] or symbol['TriggerRed']}") ``` Parse the bundle line by line rather than loading the entire file into memory at once. For large universes, streaming line-by-line reduces memory overhead significantly. ## Related How AI Tools works, compatible models, and pricing. Run natural language queries directly inside the StratAlerts setups table — no API key or code required. # Installation Guide Source: https://docs.stratalerts.com/ai-tools/installation Save your API key once in a standard local config file, then let your own script or agent fetch the latest snapshot manifest from `/api/llm/v1/snapshots/latest`. ```bash theme={null} CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/marketscanner/llm-bundle.env" mkdir -p "$(dirname "$CONFIG_FILE")" umask 077 cat > "$CONFIG_FILE" <<'EOF' MARKETSCANNER_API_KEY=PASTE_API_KEY_HERE EOF echo "Saved key to $CONFIG_FILE" ``` ```powershell theme={null} $configFile = Join-Path $env:APPDATA 'MarketScanner\llm-bundle.env' New-Item -ItemType Directory -Force -Path (Split-Path -Parent $configFile) | Out-Null @" MARKETSCANNER_API_KEY=PASTE_API_KEY_HERE "@ | Set-Content $configFile Write-Host "Saved key to $configFile" ``` Copy and paste this into your LLM: ```text theme={null} Follow these directions: https://gist.github.com/tlk3/31e0b091f0d2d8c1790a6067edca5fd3 My API key is already stored in the correct default location. If I say /msr refresh, download the latest MarketScanner bundle and then reload it from disk before answering. After refresh, work from the local bundle files unless I explicitly ask for another API call. Do not print or expose my API key. ``` Optional for users who want a saved local downloader script instead of relying on `/msr refresh`. ```bash theme={null} #!/usr/bin/env bash set -euo pipefail CONFIG_FILE="${MARKETSCANNER_CONFIG_FILE:-${XDG_CONFIG_HOME:-$HOME/.config}/marketscanner/llm-bundle.env}" if [ -f "$CONFIG_FILE" ]; then set -a . "$CONFIG_FILE" set +a fi : "${MARKETSCANNER_API_KEY:?Set MARKETSCANNER_API_KEY or create $CONFIG_FILE first}" BASE_URL="${MARKETSCANNER_BASE_URL:-https://app.stratalerts.com}" OUTPUT_DIR="${1:-$HOME/marketscanner-data/latest}" mkdir -p "$OUTPUT_DIR" MANIFEST_URL="$BASE_URL/api/llm/v1/snapshots/latest" curl --fail --silent --show-error \ -H "Authorization: Bearer $MARKETSCANNER_API_KEY" \ "$MANIFEST_URL" -o "$OUTPUT_DIR/manifest.json" extract_chunk_refs() { grep -o '\{[^}]*\}' "$OUTPUT_DIR/manifest.json" | while IFS= read -r obj; do ref="$(printf '%s\n' "$obj" | sed -n 's/.*"relative_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')" if [ -z "$ref" ]; then ref="$(printf '%s\n' "$obj" | sed -n 's/.*"path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')" fi if [ -z "$ref" ]; then ref="$(printf '%s\n' "$obj" | sed -n 's/.*"name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')" fi if [ -n "$ref" ] && printf '%s' "$obj" | grep -q '"chunk_order"\|"chunk_name"\|"symbol_count"'; then printf '%s\n' "$ref" fi done } snapshot_version="$(sed -n 's/.*"snapshot_version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$OUTPUT_DIR/manifest.json")" chunk_refs="$(extract_chunk_refs)" if [ -z "$chunk_refs" ]; then echo "No chunk references found in manifest" >&2 exit 1 fi while IFS= read -r ref; do [ -n "$ref" ] || continue chunk_name="${ref##*/}" case "$ref" in http://*|https://*) chunk_url="$ref" ;; /api/*) chunk_url="${BASE_URL%/}$ref" ;; *) if [ -n "$snapshot_version" ]; then chunk_url="${BASE_URL%/}/api/llm/v1/snapshots/$snapshot_version/$chunk_name" else chunk_url="${BASE_URL%/}/${ref#./}" fi ;; esac mkdir -p "$OUTPUT_DIR/$(dirname "$ref")" curl --fail --silent --show-error \ -H "Authorization: Bearer $MARKETSCANNER_API_KEY" \ "$chunk_url" -o "$OUTPUT_DIR/$ref" done <<< "$chunk_refs" missing=0 while IFS= read -r ref; do [ -n "$ref" ] || continue if [ ! -f "$OUTPUT_DIR/$ref" ]; then if [ "$missing" -eq 0 ]; then echo "Bundle incomplete. Missing chunks:" >&2 fi echo "- $ref" >&2 missing=1 fi done <<< "$chunk_refs" if [ "$missing" -ne 0 ]; then exit 1 fi chunk_count="$(printf '%s\n' "$chunk_refs" | grep -c '.')" echo "Bundle ready: $OUTPUT_DIR" echo "snapshot_version=${snapshot_version:-unknown}" echo "chunk_count=$chunk_count" ``` ```powershell theme={null} $ErrorActionPreference = 'Stop' $configFile = if ($env:MARKETSCANNER_CONFIG_FILE) { $env:MARKETSCANNER_CONFIG_FILE } elseif ($env:APPDATA) { Join-Path $env:APPDATA 'MarketScanner\llm-bundle.env' } else { Join-Path $HOME 'AppData\Roaming\MarketScanner\llm-bundle.env' } if ((-not $env:MARKETSCANNER_API_KEY) -and (Test-Path $configFile)) { Get-Content $configFile | ForEach-Object { if ($_ -match '^\s*MARKETSCANNER_API_KEY=(.+)$') { $env:MARKETSCANNER_API_KEY = $matches[1].Trim() } } } if (-not $env:MARKETSCANNER_API_KEY) { throw "Set MARKETSCANNER_API_KEY or create $configFile first." } $baseUrl = if ($env:MARKETSCANNER_BASE_URL) { $env:MARKETSCANNER_BASE_URL } else { 'https://app.stratalerts.com' } $outputDir = if ($args.Length -gt 0) { $args[0] } else { Join-Path $HOME 'marketscanner-data/latest' } New-Item -ItemType Directory -Force -Path $outputDir | Out-Null $manifestUrl = "$baseUrl/api/llm/v1/snapshots/latest" $headers = @{ Authorization = "Bearer $($env:MARKETSCANNER_API_KEY)" } $manifest = Invoke-RestMethod -Headers $headers -Uri $manifestUrl $manifest | ConvertTo-Json -Depth 10 | Set-Content (Join-Path $outputDir 'manifest.json') $snapshotVersion = if ($manifest.snapshot_version) { "$($manifest.snapshot_version)" } else { '' } $chunkRefs = @() foreach ($chunk in @($manifest.chunks)) { $ref = '' if ($chunk.PSObject.Properties.Name -contains 'relative_path' -and $chunk.relative_path) { $ref = "$($chunk.relative_path)".Trim() } elseif ($chunk.PSObject.Properties.Name -contains 'path' -and $chunk.path) { $ref = "$($chunk.path)".Trim() } elseif ($chunk.PSObject.Properties.Name -contains 'name' -and $chunk.name) { $ref = "$($chunk.name)".Trim() } if ($ref) { $chunkRefs += $ref } } if (-not $chunkRefs.Count) { throw 'No chunk references found in manifest' } foreach ($ref in $chunkRefs) { $chunkName = Split-Path -Leaf $ref if ($ref -match '^https?://') { $chunkUrl = $ref } elseif ($ref.StartsWith('/api/')) { $chunkUrl = "$baseUrl$ref" } elseif ($snapshotVersion) { $chunkUrl = "$baseUrl/api/llm/v1/snapshots/$snapshotVersion/$chunkName" } else { $chunkUrl = "$baseUrl/$($ref.TrimStart('/'))" } $targetPath = Join-Path $outputDir ($ref -replace '/', [IO.Path]::DirectorySeparatorChar) $targetDir = Split-Path -Parent $targetPath if ($targetDir) { New-Item -ItemType Directory -Force -Path $targetDir | Out-Null } Invoke-WebRequest -Headers $headers -Uri $chunkUrl -OutFile $targetPath } $missing = @() foreach ($ref in $chunkRefs) { $targetPath = Join-Path $outputDir ($ref -replace '/', [IO.Path]::DirectorySeparatorChar) if (-not (Test-Path $targetPath)) { $missing += $ref } } if ($missing.Count -gt 0) { Write-Error "Bundle incomplete. Missing chunks:`n- $($missing -join "`n- ")" exit 1 } Write-Host "Bundle ready: $outputDir" Write-Host "snapshot_version=$([string]::IsNullOrWhiteSpace($snapshotVersion) ? unknown : $snapshotVersion)" Write-Host "chunk_count=$($chunkRefs.Count)" ``` # Strat Data for LLMs Source: https://docs.stratalerts.com/ai-tools/overview AI Tools gives you structured, live Strat market bundles refreshed every 5 minutes, ready to feed into GPT, Claude, Gemini, and any other LLM. Included with the Founders Plan or available as a standalone add-on. ## Realtime Market Data for AI Workflows AI Tools brings StratAlerts market data directly into your AI workflows. Every five minutes, StratAlerts compiles a structured snapshot of every tracked symbol — complete with TFC state, candle data across nine timeframes, and full setup fields — and makes it available as a downloadable NDJSON bundle. You feed that bundle into your LLM of choice, and your model can answer detailed questions about current market conditions using real, live data instead of hallucinating on stale training knowledge. **Founders Plan subscribers** already have AI Tools included at no extra cost. If you are on the Basic plan or have no scanner subscription, AI Tools is available as a standalone add-on at \$25/mo. ## How it works If you are on the Founders Plan, AI Tools is already active — go to your account settings to find your bundle URL and API key. Otherwise, subscribe to AI Tools at **\$25/mo** from your StratAlerts account. The bundle updates automatically every 5 minutes — no polling configuration required on your end. Make an HTTP GET request to your bundle URL with your API key in the header. The response is an NDJSON file — one JSON object per line, one line per symbol. Paste the bundle content into your LLM's context window or attach it as a file, then add your starter prompt. Ask your LLM questions about the current market structure. The model can reason over TFC state, candle scenarios, in-force flags, setup targets, and more — across every symbol in the bundle. ## Compatible models AI Tools bundles are plain structured JSON, so they work with any model that accepts a file or text context. GPT-4o and later models accept large context windows. Paste the bundle directly or use the Assistants API with file attachments. Claude's extended context window handles full bundles easily. Use the API or paste directly into Claude.ai. Gemini 1.5 and later support large context inputs. Pass the bundle via the API or Gemini Advanced. Use Codex for programmatic workflows — generate scanning scripts, filters, or automated reports from live bundle data. Self-hosted Llama 3 deployments work with the same bundle format. Ideal for private, on-premise AI workflows. The NDJSON format is model-agnostic. If your model accepts text or file input, the bundle works. ## What you can do with it Ask the model to summarize current TFC alignment across sectors, identify which symbols have the most timeframe continuity, or flag setups where multiple timeframes are aligned in the same direction. Describe the setup pattern you're looking for in plain English. The model searches the bundle for matching symbols rather than you having to manually filter a table. Example prompts: * "Which stocks are 2U on the daily with a green weekly TFC?" * "Show me names that are in-force on the 60-minute timeframe." * "Find symbols where the daily and weekly are both 2U." Use Codex or the OpenAI API to write scripts that fetch the bundle, filter for specific conditions, and generate a formatted market brief — automatically, on a schedule. Save snapshots at regular intervals to build a historical record of setup states. Use that history to study how certain TFC configurations or in-force conditions played out over time. ## Pricing AI Tools is **included at no extra cost** with the Founders Plan. If you are on the Basic plan or have no scanner subscription, you can purchase AI Tools as a standalone add-on at **\$25/mo**. The plan includes **2 GB of data per month**. Most workflows stay well within the included data cap. If your workflow fetches the bundle frequently or processes large volumes of data, additional usage is billed at \$5 per GB beyond the included 2 GB. Fetching the bundle once per refresh cycle (every 5 minutes) for a typical session uses a fraction of the 2 GB monthly cap. Overage charges apply mainly to high-frequency automated pipelines that fetch far more often than the bundle actually updates. ## Watch a Demo