How to build and test a trading strategy with Claude or ChatGPT
By the PipYard team · 6 min read · Updated
AI assistants are good at turning a rough trading idea into precise rules, and at explaining a test report. They are poor backtesters on their own: they can't see your broker's price history, and when asked for results they may estimate or recompute indicators in ways that don't match your platform. The useful setup is to let the AI describe and adjust the strategy while a deterministic engine runs the tests.
What the AI should and shouldn't do
- Should: turn your idea into exact entry, exit and stop rules; propose variations; read reports and explain what changed between versions.
- Should not: invent performance numbers, choose what you trade, place orders, or change your risk limits.
PipYard's connector for Claude and ChatGPT is built around that split. The AI calls PipYard's tools; the tests run on PipYard's servers against real or uploaded price data; the release gate is checked on the server, not by the model.
Connect PipYard
- Create a PipYard account. The Free plan works.
- In Claude, open Settings → Connectors and add PipYard from the directory. In ChatGPT, PipYard offers the research tools only.
- Sign in to PipYard when asked and approve the connection. You can disconnect any time in PipYard under Settings → AI connections.
The full tool list and how your data is handled are on PipYard in Claude and ChatGPT.
A first session, step by step
- Describe the idea in plain words. "Gold, H1. Enter long when the close breaks the 20-bar high, stop at 2 ATR, target 2R. Only trade the London and New York sessions."
- Let the AI write it as a strategy. It creates a draft in your PipYard account. Check the rules it wrote; ask it to show them back to you.
- Ask for a walk-forward test. A dry run first shows how many compute credits it will use. The test runs on your MT5 history through the Connector, or on a price file you uploaded.
- Read the report together. Ask: "Did it pass the release gate? Which check failed, and in which test windows did it lose?"
- Change one thing at a time. Each change is saved as a new version, and earlier versions stay. Compare versions by average R per trade, not by win rate.
- Stop or continue. Most ideas fail the gate. That is the point: they fail in a test, not on your account.
- Forward test on demo (Claude). A version that passes the gate can be sent to your MT5 demo account. The AI can only prepare the request; it starts when you approve it in the PipYard app.
Prompts that work well
- "List my PipYard strategies and the latest walk-forward result for each, ranked by average R."
- "Write these rules as a PipYard strategy, then run a dry-run walk-forward on EURUSD H4 from 2018 and tell me the credit cost."
- "Compare versions 3 and 4. Which out-of-sample metrics changed, and is the difference bigger than the trade count supports?"
- "Show the trades from the worst test window and the rule values on each entry bar."
- "Which release-gate checks did this version fail, and by how much?"
Guardrails worth keeping
- The AI never trades live, and can't change execution modes, risk limits or the kill switch. Those change only in PipYard, by you.
- Strategy names and notes from teammates are treated as data, not instructions, so a shared workspace can't steer your AI into starting something.
- Results are simulated. Treat any figure the AI quotes as something to check in the report, which PipYard keeps with every trade.
What it costs
The AI runs on your own Claude or ChatGPT plan. PipYard's tests use compute credits: one credit is one CPU-minute, and an eight-year H1 walk-forward usually takes about one. The Free plan includes 60 credits a month, one released strategy and one demo forward test at a time. Pro and Elite add more of each; see pricing.
Simulated results. Past performance does not guarantee future results.