A beginner's operating manual for the two learning machines in this folder — written 9 Aug 2026, Sydney time throughout.
Here is the most valuable paragraph in this playbook. Everything you need to test costs $0. The paper trader uses fake money by design (it physically cannot place real orders — the code refuses any broker host except Alpaca's paper one), and the arb scanner needs no wallet at all. So the A$100 is not needed to start, and putting it anywhere now would only add risk without adding learning.
The honest numbers, so you know the game you're entering: the best academic studies of retail day traders are grim. A large Brazilian study of everyone who began day-trading futures over several years found 97% of those who persisted lost money, and a famous Taiwanese study found less than 1% of day traders were reliably profitable year after year. That's not a reason to quit — it's the reason this project tests with fake money first. Most strategies die in testing. Finding that out for $0 instead of for your savings is the win.
The realistic plan for the A$100:
(The usual reminder: I'm not a financial advisor and this is education, not financial advice.)
The paper trader (tv-paper-trader/) answers: "is my strategy any good?" TradingView watches the chart and fires buy/sell alerts from a strategy script; a tiny server on your Mac catches them, checks them against safety gates, and (once armed) places fake-money orders on Alpaca. Every alert is journaled. After a few weeks you compare what the backtest promised with what paper trading delivered — that gap tells you if the strategy was ever real.
The arb scout (the root project) answers: "why can't I just harvest price differences?" It watches the same coin priced on different Solana exchanges, spots gaps, and — crucially — re-checks each gap a moment later to show you how fast it dies. It's a measuring instrument for the speed race you'd be entering. Expect it to prove you'd lose the race; that proof, from your own data, is the product.
Both write journals to data/. Both turn those journals into a plain-English web page with one command: npm run report → open data/report.html.
| Where | Command | What it does |
|---|---|---|
tv-paper-trader/ |
npm run selftest |
Offline check of every safety gate (run after any change) |
tv-paper-trader/ |
npm run serve |
Start the webhook server (journal-only until armed) |
tv-paper-trader/ |
npm run report |
Turn the signal journal into data/report.html |
| root | npm run scan |
Watch cross-DEX spreads live; Ctrl+C for summary |
| root | npm run report |
Turn the scan journal into data/report.html |
| root | npm run exec:sim |
Build + simulate the real arb transaction (sends nothing) |
| root | npm run selftest |
Offline check of the executor's safety rails |
npm run scan a few evenings, and at least once overnight into the US session (US market hours are roughly 11:30pm–6am Sydney while the US is on daylight saving; about an hour later otherwise). It now watches three pairs: SOL/USDC (tight, competitive), JUP/USDC and BONK/USDC (wilder). Let candidates accumulate.tv-paper-trader/: npm run selftest, then npm run serve, then in another terminal poke it with the curl line from the README. You should see dry_run — the pipeline works end to end without any accounts.pine/ema_cross_multi_v2.pine, click Add to chart on SPY, 1D. The status panel (top right) tells you what it's waiting for. Open the Strategy Tester tab and just look: equity curve, list of trades, win rate.npm run report in both projects and read your first reports.tv-paper-trader/.env, set DRY_RUN=false, restart npm run serve. The startup banner shows your fake-money equity — that's how you know it's the paper account.cloudflared tunnel --url http://localhost:8787, put the tunnel URL + /webhook in each alert's Webhook URL box, and paste the JSON from the .pine file header (with your real secret from data/alert-message.txt) into the Message box. One alert per symbol.Every Sunday: npm run report in both projects. For the paper trader, put three numbers side by side — what the out-of-sample backtest promised, what paper delivered, and the difference. For the scanner, read the verdict box. Then decide like a scientist: iterate the strategy (one change at a time, re-test from week 2), or kill it and try a new idea. Killing a strategy is progress, not failure — each one you bury on paper is money you didn't bury for real.
data/alert-message.txt), never in the Pine script — scripts get shared, alerts don't.| Symbol | What | TradingView ticker | Timeframe | Why it's on the list |
|---|---|---|---|---|
| SPY | S&P 500 ETF | SPY | 1D | The market itself; calmest teacher |
| QQQ | Nasdaq-100 ETF | QQQ | 1D | Tech index; trends harder both ways |
| AAPL | Apple | AAPL | 1D | Mega-cap; clean liquid chart |
| MSFT | Microsoft | MSFT | 1D | Mega-cap; steadier trends |
| NVDA | Nvidia | NVDA | 1D | High volatility with huge volume |
| TSLA | Tesla | TSLA | 1D | Wildest of the stocks; stress-tests stops |
| BTC | Bitcoin | COINBASE:BTCUSD | 4H / 1D | Crypto benchmark; trades in your waking hours |
| ETH | Ethereum | COINBASE:ETHUSD | 4H / 1D | Second benchmark; moves harder than BTC |
| LINK | Chainlink | COINBASE:LINKUSD | 4H / 1D | Mid-cap crypto; noisier — instructive |
Solana (SOL) isn't tradable on Alpaca — your Solana exposure is the arb-scout project, where it belongs. Nine symbols is plenty: more tickers means more alerts to babysit, not more learning.
Two automatic briefs land on weekdays (you can change or cancel them anytime by asking Claude):
How a beginner should use them: as context, not signals. The right reaction to "CPI tonight" is "my strategy might whipsaw tonight — that's normal," not a manual trade. If a brief ever tempts you to override the system, write the temptation in a note instead and check in a week whether obeying it would have helped. (Spoiler: keep the note anyway; the record is the point.)
Because you're busy on weekdays, the boring work now runs itself. Four moving parts:
The strategy lab (strategy-lab/) runs the full pipeline twice a day — 8:10am Sydney (right after the US close, so any buy/sell change reaches your phone the morning it's actionable) and 9:30pm (the full nightly re-test): fetch fresh daily prices for the whole watchlist → backtest 13 strategy variants (EMA cross, breakout, dip-buyer, MACD families) with costs modeled → tune only on older data → judge each family's best on the last ~18 months it never saw. This is a swing-trading system: daily bars, positions held days to weeks, decisions only on closed bars. The output is data/leaderboard.html (plain English), a phone-ready status page, and — when a strategy survives — a ready-to-paste TradingView file in data/best/ wired for the webhook server. "No champion tonight" is a real and common result; the lab will say so rather than crown a lucky junk strategy. A tournament winner is still partly luck — treat its backtest number as a ceiling, expect half or less, and let paper trading judge it.
The always-on scanner: the Solana arb scanner now runs as a background service whenever your Mac is awake (auto-restarts if it dies), quietly filling data/scan-*.jsonl. The nightly run refreshes its report. To be clear about what that data is: cross-DEX price gaps measure execution speed, they do not forecast market direction — the "trend board" on your status page (up/down/mixed per symbol) comes from daily price data, and even that is descriptive, not a prediction. Nobody reliably predicts tomorrow; the lab's edge-hunting is about finding rules that survived the past honestly.
The lab→paper bridge (ships OFF — you arm it): the nightly run can also act on the tournament. When enabled, the champion's position changes are sent as buy/sell signals to your own webhook server, which applies every safety gate — dedupe, position caps, daily kill switch — and, only once the server itself is armed, places the Alpaca paper trades. Three switches must ALL be on: ENABLE_BRIDGE=true in strategy-lab/.env, the paper server running (service below), and the server armed (paper keys + DRY_RUN=false). Until that last switch, bridge signals journal as dry-run rows — run it that way for a week and read the report before arming anything. When no champion survives a night, the bridge sells everything: flat is a position, and it's the honest one. SOL is chart-only (not on Alpaca) and is never traded. This is the same closed-loop architecture as the "AI trading bot" tutorials — except the strategy must re-win its seat every single night, on paper, with fake money.
Phone pushes + status page: nightly results land on your iPhone via the free ntfy app, and the status page gives you a 10-second check from anywhere — trend board, champion, what to do next, and whether the pipelines are alive.
One-time setup (four pastes in Terminal, ~10 minutes):
cd "/Users/kevinluong/Projects/Personal Projects/ai-trader/strategy-lab"
npm install && npm run selftest
npm run fetch && npm run lab && open data/leaderboard.html
cp com.kevin.trading-lab.plist com.kevin.arb-scanner.plist com.kevin.paper-server.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.kevin.trading-lab.plist
launchctl load ~/Library/LaunchAgents/com.kevin.arb-scanner.plist
launchctl load ~/Library/LaunchAgents/com.kevin.paper-server.plist
strategy-lab/.env (NTFY_TOPIC=...), then test with npm run notify -- "hello".Optional — the status page on your domain: npx wrangler login (one browser approval), set DEPLOY=true in strategy-lab/.env, then npm run publish. Your page appears at trading-status.pages.dev; open it on your iPhone and use Share → Add to Home Screen for an app-like icon. To put it on your own domain, attach a custom domain (e.g. status.hushify.app) to the trading-status Pages project in the Cloudflare dashboard. One caution: the page is public to anyone who has the URL (it's only paper data, but if that bothers you, Cloudflare Access can lock it to your email).
Why two pushes a day and not hourly: daily-bar swing strategies only know anything when a bar closes. An "hourly buy/sell alert" on daily rules would be reacting to half-formed bars — a cross at 2pm that un-crosses by the close is a false signal, which is why the Pine scripts refuse intrabar decisions too. Two well-timed pushes (post-US-close signals + evening re-test) is the honest maximum for this style. If you ever want faster crypto swing signals, the designed channel is the TradingView alert path on 4-hour bars — still closed-bar discipline, just a faster bar.
Reality notes: launchd jobs only run while the Mac is on and awake — plug it in and enable "Prevent automatic sleeping when the display is off" (System Settings → Battery/Energy → Options) if you want true always-on; otherwise the system simply picks up where it left off. Logs live in strategy-lab/data/daily.log and data/scanner.log when something looks off. To pause everything: launchctl unload the same two files.
Docs you'll actually open:
Learning (free):
Books (two is enough to start):
Traps (all of these are "no"):
.env files (gitignored) and the TradingView alert box — nowhere else, and never in chats, screenshots, or scripts..env; it's a free-tier convenience, not money — but rotate it if it leaks, like any key.Generated by Claude for Kevin — 9 Aug 2026. Companion files: src/report.ts in both projects (npm run report), pine/ema_cross_multi_v2.pine, the strategy-lab/ autopilot, and the two READMEs, which remain the deeper technical truth.