optd-starter
Health Uyari
- License — License: NOASSERTION
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 7 GitHub stars
Code Gecti
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Build and honestly backtest trading systems with Claude Code + TradingView + Sierra Chart. ORB worked example, the three-test bias gauntlet (Fit / Fill / Fluke), and a teaching .scid tick reader. Companion repo to the One Person Trade Desk videos.
OPTD Starter
A starter template for developing and backtesting trading systems with Claude Code, the OPTD way: build the idea fast on TradingView, sniff it on a chart, then validate it honestly on Sierra Chart tick data.
This repo ships with a worked example — an Opening Range Breakout (ORB) indicator + strategy in Pine Script — and the one-shot prompt that builds them.
📺 The videos · 📧 Newsletter · 🌐 onepersontradedesk.com
The library — one component per video
Every video adds a runnable component to this repo. This table is the index, newest first. The method is always in the video, free.
| # | Video | What it shipped here |
|---|---|---|
| 16 | How to Size Trades in a Volatile Market (I Built a VIX Alert With Claude Code) | The VIX sizing check prompt (research/prompts/vix_sizing_check.md): the prompt typed in the video, which builds a read-only Python script you run before the open. Free Cboe VIX/VXN history in, one line out: the tier (NORMAL / CAUTION / STRESS on the VIX's jump above its 20-day average), the expected move (VIX ÷ 16) and how many contracts your risk buys at today's ATR, never rounded up. Plus the example config.json from the screen. Never places orders, no signals |
| 15 | My Trading System Loses 4 Out of 5 Trades. Here's Why It Works | The losing streak simulator (onepersontradedesk.com/tools/losing-streak-simulator): put in your win rate and your average win in R, see the losing streaks and drawdowns you'd actually sit through. A free web page, nothing to install. Synthetic math, no strategy |
| 14 | I Reverse Engineered TJR's Strategy With AI and Tested It on 7 Years of Data | The test-any-YouTube-strategy prompt (research/prompts/test_any_youtube_strategy.md): transcript in, every rule quoted, every gap frozen as a named assumption before any result, MATCH on the video's own days, then the seven tests in order (TIME · MATCH · FIT · FILL · FLUKE · COUNT · BENCHMARK) with a coin flip on the same stops, graded "survived to X". Runs on your own data. Tests the rules as stated, never the person |
| 13 | How to Set Up Sierra Chart | The starter demo chartbook (sierra/chartbooks/OPTD-starter-demo.Cht, load steps in sierra/chartbooks/STARTER-DEMO.md): MES 1-minute with VWAP + bands and large trade bubbles, built-in studies only. It's the finished chart the video opens on. Context, not a strategy |
| 12 | How to Reverse Engineer Any TradingView Indicator (With Claude Code) | The Pine Script → Sierra Chart port prompts (research/prompts/pine_to_sierra_port.md): the port prompt (Pine source → an ACSIL study, with the license check and an input/output inventory before any code) and the compare prompt (your TradingView export vs your Sierra Chart export, bar by bar, GREEN/RED). Plus the no-source lane. Runs on your own exports. Never ships anyone's indicator |
| 11 | Why You Keep Busting Lucid and Topstep Accounts (It's Not Your Strategy) | The rope calculator (risk/rope_calculator.xlsx): size against the drawdown, not the account. Points to bust at every contract count (minis next to micros), max contracts for a move, a daily floor check and an illustrative ratchet ladder, all formulas. Plus the floor-and-ratchet checklist (risk/FLOOR-AND-RATCHET-CHECKLIST.md). Web version: onepersontradedesk.com/tools/prop-firm-position-size-calculator. Synthetic math, no strategy |
| 10 | How to Backtest in Sierra Chart (Why I Don't Use Replay Mode) | The bias check — a Claude Code skill you point at your own backtest (.claude/skills/bias-check/SKILL.md, or paste research/prompts/bias_check.md without skills): it maps the pipeline from raw data to the equity number, checks every indicator for lookahead and runs probes against your code, never editing it. Plus the backtest pipeline starter prompt — 12 requirements in order (research/prompts/backtest_pipeline_starter.md) — and test 4 · TIME, the lookahead demo on random data where reading the still-forming 10-minute candle turns a loss into a profit (run_lookahead_demo.py, probes in backtests/probes.py). The pipeline is the chassis; the edge is yours |
| 9 | How I Copy Trade 5 Lucid Accounts From Sierra Chart | The Sierra Chart → Lucid (Rithmic) click-path checklist (sierra/LUCID-RITHMIC-CHECKLIST.md): one lead account in Sierra Chart, four followers copied by Rithmic's Trade Copier, the per-view Trade Account rule, the pass condition, and why the copier is not atomic. Starts from the chartbook (sierra/chartbooks/OPTD.Cht). Plumbing, not a strategy |
| 8 | How to Trade TopstepX From Sierra Chart — Keep the Charts You Actually Use (Free Code) | No new slice here: the Sierra Chart → TopstepX manual mirror ships in its own repo, optd-sierrachart-topstepx-mirror. You click the order in Sierra Chart and it copies it to TopstepX through the ProjectX API. Plumbing, not a strategy |
| 7 | Sierra Chart Automated Trading: How to Build a System That Doesn't Blow Up (Claude Code) | The order manager starter prompt — seven requirements (arming switch that defaults to OFF, bracket on entry, one position at a time, size as an input, emergency flatten, mismatch handling, bar-close gate) as a paste-ready file (research/prompts/order_manager_starter.md). Drives the ORB signal study (sierra/studies/OPTD_Opening_Range.cpp) in SIM. The prompt is the chassis; the method is in the video |
| 6 | Sierra Chart Setup 2026: Which Package Should You Buy? (Don't Overpay) | No new slice — the buying decision for the desk's platform layer (which package, the real monthly cost). Uses the chartbook (sierra/chartbooks/OPTD.Cht) and the ORB study it unlocks (sierra/studies/OPTD_Opening_Range.cpp) |
| 5 | How to Build a Sierra Chart Indicator with Claude Code | The ACSIL signal study (sierra/studies/OPTD_Opening_Range.cpp), the deploy scripts + four build gotchas (sierra/DEPLOY.md), the chartbook (sierra/chartbooks/OPTD.Cht), and the one-shot study prompt (research/prompts/orb_sierra_chart_study.md) |
| 4 | Claude Code Trading Strategies Are Easy to Build. That's the Problem. (I Tested 5) | The three-test gauntlet — FIT (run_cheat_demo.py), FILL (run_fills_demo.py), FLUKE (run_drift_demo.py), end to end (run_gauntlet.py) |
| 3 | Claude Code Backtests on Real Tick Data (The Test TradingView Can't Run) | The teaching Sierra Chart .scid tick reader (backtests/ticks.py) and the ticks → bars → honest-fills demo (run_scid_demo.py) |
| 2 | Hedge Funds Pay $5M for This Trading Desk. I Built Mine for $150 a Month | The desk itself — this repo's folders mirror the 10 desk roles that video tours |
| 1 | Opening Range Breakout Strategy Doesn't Work (Claude Code Backtest) | The worked example — ORB indicator + strategy in Pine (indicators/pine_reference/) and the prompt that builds them (research/prompts/orb_indicator_and_strategy.md) |
⭐ Star the repo to follow along — a new row lands with every video, and stars are how other traders find this.
Quick start (60 seconds, no market data)
git clone https://github.com/drewautomates/optd-starter.git
cd optd-starter
python3 -m pip install -r requirements.txt # just numpy
python3 backtests/runs/run_gauntlet.py
That runs all three bias tests end to end in a few seconds. Nothing to download, no API key, no broker account — every demo generates its own synthetic data, so it runs the same on Windows, macOS, and Linux, offline. Requires Python 3.9+.
Windows: use
pythoninstead ofpython3(orpy -3). macOS and most Linux distros ship onlypython3— that's the one difference in every command on this page. Run from the repo root; no virtualenv orPYTHONPATHsetup is needed, though a venv is never a bad idea.
Then, for the TradingView side:
- Paste
indicators/pine_reference/Opening_Range.pineandOpening_Range_Strategy.pineinto TradingView's Pine Editor, add to chart. - Use an intraday chart (1m–15m) on a futures symbol (
NQ1!,ES1!,MNQ1!). Chart TF ≤ Signal TF. - To rebuild the Pine from scratch with Claude Code, hand it
research/prompts/orb_indicator_and_strategy.md.
The workflow (what the video walks through)
Indicator — see the setup on the chart (the eyes).
indicators/pine_reference/Opening_Range.pineStrategy + TradingView Strategy Tester — a quick "is there a pulse?" backtest. Fast, visual, imperfect.
indicators/pine_reference/Opening_Range_Strategy.pinePython pipeline — the honest verdict. The first layer is in: honest fills. A backtest can manufacture a fake edge out of nothing just by assuming fills it never got. Run it yourself:
python3 backtests/runs/run_fills_demo.pyIt runs the same ORB through two fill models on random-walk data (which has no real edge). The honest fills report ~0, as they must. The naive fills conjure a positive expectancy from thin air — that gap is the lie. Files:
indicators/python/orb.py,backtests/fills.py,backtests/kernels.py. More gates (walk-forward, permutation, Monte-Carlo) fill in as I build the desk in public.Sierra Chart tick data — where honest fills come from. A backtest is only as honest as its data, and the honest-fills lesson turns on one bit per bar — did the high print before the low? — that lives in the ticks, not in OHLC. This slice is a teaching Sierra Chart
.scidreader: it writes a synthetic tick stream in the real.scidrecord shape, reads it back by parsing the bytes (the actual skill), and reconstructs bars from the ticks — then feeds those tick-rebuilt bars straight into the honest-vs-naive test. Run it:python3 backtests/runs/run_scid_demo.pySame random-walk data (honest ≈ 0), but now the whole thing is anchored on the tick reading that makes honest fills possible in the first place. Once you can read the ticks, you reconstruct any strategy tick by tick instead of trusting a platform's guess. Files:
backtests/ticks.py,backtests/runs/run_scid_demo.py.
Step 2 is something anyone can do. Steps 3–4 are the differentiator: rigorous vibe coding for trading.
The gauntlet — three tests, free, runnable today
Every backtest tells you three lies. Each one has a test, all three are in this repo, and they run on
synthetic random-walk data on purpose: random data has no edge in it, so every dollar these tests
report as profit is provably fake. You watch each bias manufacture money and then hand it back — the
lie, in a lab, where you can see all of it. Then you point them at your own results.
| Test | Command | What it catches |
|---|---|---|
| 1 · FIT | python3 backtests/runs/run_cheat_demo.py |
Let the backtest cheat — signal-close entries, no commission, fill on every touch — then take the cheats away one at a time. If it still loses at pass 0, you're done; nothing else needs checking. |
| 2 · FILL | python3 backtests/runs/run_fills_demo.py |
When your stop and your target land inside the same bar, which one hit first? The bar doesn't record it. Naive fills guess in your favour; honest fills don't. |
| 3 · FLUKE | python3 backtests/runs/run_drift_demo.py |
Take the signal away. Same times in, same times out, no signal — just be in the market. Run in a flat market and a rising one, because this test only bites in one of them. |
| all three | python3 backtests/runs/run_gauntlet.py |
End to end in a few seconds. |
Run them before you put money behind a strategy, not after.
The bias check — point it at your own backtest
The gauntlet shows the lies on random data. The bias check goes looking for them in your code.
It's a Claude Code skill: point it at your backtest folder and it maps the pipeline from raw data to
the equity number, checks every signal and indicator for lookahead, runs probes against your real
code, and writes a report of where the number may be fake, with the file, the line, and both numbers
side by side. It never edits your files.
# from a clone of this repo, in Claude Code
/bias-check ../path/to/your-backtest
No skills? Paste research/prompts/bias_check.md into Claude Code
from inside your own backtest folder instead.
The most expensive lie gets its own demo, because it's the one that looks like the best edge you've
ever found:
| Test | Command | What it catches |
|---|---|---|
| 4 · TIME | python3 backtests/runs/run_lookahead_demo.py |
A 1-minute strategy with a 10-minute trend filter. Read the 10-minute candle that's still forming and it already knows its own close. Same strategy, same fills, same costs, random data: one index turns a loss into a profit. The probe in backtests/probes.py catches it by deleting the future and checking whether the answer changes, without reading a line of the code. |
Test three reports every gap against its own noise floor. The strategy and its control
trade the same bars, so they're scored as a paired difference — the market's variance cancels
and what's left is the part the signal is answerable for. A gap smaller than that floor comes
back INCONCLUSIVE, not as a win. That one rule disqualifies more strategies than the three
tests do, and it's the reason the flat-market run below refuses to call a +$0.83/trade result
an edge.
Teaching layer vs production. What's in this repo is the teaching layer — the method, on synthetic data, so you can see the lie with zero hand-waving. The
.scidreader here parses the real record format but runs on a synthetic tick file. The production harness — the real.scidreader over live exchange files (timezone handling + a parquet cache that replays years in seconds so you can run thousands of permutations), the multi-gate validated kernel, and the production gauntlet running these same three tests over real exchange data — runs on the live desk and ships in the community. The three tests above are free and always will be. What's paid is the data and the engine, never the method. No methodology is ever gated.
Structure
optd-starter/
├── CLAUDE.md # project context for Claude Code
├── .claude/
│ ├── settings.json # tool permissions
│ ├── skills/bias-check/ # /bias-check <your folder> — audits your backtest
│ └── agents/ # sub-agents (added as the desk grows)
├── data/
│ ├── tick/ # raw tick data (gitignored)
│ ├── cache/ # parquet cache (gitignored)
│ └── README.md # how to populate
├── research/
│ ├── prompts/ # prompt library (one-shot builders)
│ └── notebooks/
├── backtests/
│ ├── data.py # Bar + synthetic sessions (optional drift) + CSV loader
│ ├── costs.py # commission + slippage presets — the cheat ladder (test 1)
│ ├── fills.py # fill models — naive (the lie) vs honest (test 2)
│ ├── drift.py # the no-signal control + the noise floor (test 3)
│ ├── kernels.py # validated exit kernels + self-test
│ ├── ticks.py # teaching .scid reader (ticks → bars)
│ ├── probes.py # lookahead probes: delete the future, see if the answer changes
│ └── runs/ # runnable demos
│ ├── run_gauntlet.py # all three bias tests
│ ├── run_cheat_demo.py # 1 · FIT
│ ├── run_fills_demo.py # 2 · FILL
│ ├── run_drift_demo.py # 3 · FLUKE
│ ├── run_lookahead_demo.py # 4 · TIME — the forming higher-timeframe candle
│ └── run_scid_demo.py # ticks → bars → honest fills
├── indicators/
│ ├── python/ # Python implementations (parity with Pine)
│ └── pine_reference/ # Pine source — the spec
├── sierra/
│ ├── DEPLOY.md # deploy → build → verify, and the four gotchas
│ ├── scripts/ # deploy.ps1 / deploy.sh → your ACS_Source
│ ├── studies/ # .cpp ACSIL studies
│ ├── chartbooks/ # .Cht chartbooks
│ └── exports/ # Export Chart Data CSVs
├── journal/
│ └── schema.sql
└── README.md
How this maps to the desk (the 10 roles)
This repo is the tangible companion to the One Person Trade Desk tour — the same roles, as folders. The judgment role (Portfolio Manager) is you; Claude Code is the bench that runs the rest.
| Folder | Desk role |
|---|---|
research/ |
Quant Researcher — ideas → specs, the prompt library |
indicators/ |
Quant Developer — Claude Code writes the code (Pine = spec, Python = parity) |
backtests/ |
Quant Researcher + Risk Manager — exit kernels, walk-forward, Monte-Carlo |
data/ |
Data Engineering — tick data + parquet cache |
sierra/ |
Execution Trader + Tech Infrastructure — ACSIL studies, live exports. Start at sierra/DEPLOY.md. |
journal/ |
Performance Analytics + Compliance — trade log + honest self-review |
Most of these are scaffolded today and fill in as I build each role on camera.
Hard-won gotchas (baked into the prompt)
- Range from high/low, never closes — close-based collapses to a zero-width line when the OR window is a single signal-TF bar.
- Levels computed inline, not through
request.security— the OR high/low are timeframe-invariant, so computing them inline draws smoothly and makes the indicator and strategy match exactly. Pulling levels throughrequest.securitycauses a zero-width "snap"/immediate-drop and indicator-vs-strategy drift. - Only the consecutive-close counter is timeframe-dependent — it runs on a fixed Signal timeframe via
request.security, so swapping the chart view doesn't move the entries. - Return counts, not momentary booleans, across
request.security— momentarytrueflags don't survive the security boundary; detect the breakout edge on the chart side. - Futures need
margin_long/shortin thestrategy()call — the default (0) demands full notional (~$600k for 1 NQ), so a $50k account silently places zero trades ("This report requires trade data").
Follow along
This repo fills in as I build the desk in public. The newsletter is where it connects — new drops, the methodology behind them, and the waitlist for the OPTD community when it opens.
→ Subscribe · onepersontradedesk.com
Still deciding what to build the desk on? The platform calls, from the operator's side:
Sierra Chart vs TradingView ·
NinjaTrader vs Sierra Chart ·
ATAS vs Sierra Chart ·
Quantower vs Sierra Chart ·
all comparisons
License
MIT — see LICENSE. Educational/research only; not financial advice.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi