Build your first strategy
From a blank account to your first honest backtest in about ten minutes. We'll build a small momentum idea, run it, and learn to read what the engine tells us.
1. Sign in
TradeBricks signs you in with email/password or Google. Your account exists so your saved strategies and published work follow you across devices — it does not store any broker credentials (more on that in The Trader).
- Click Sign in from the landing page.
- Continue with Google, or create an account with an email and password.
- You’ll land in The Lab — the canvas where strategies are built.
2. Build your first strategy
A strategy is a graph of bricks. Every strategy needs the same backbone: a data feed, some logic that decides when to act, an entry that opens a position, and an exit that closes it. We’ll build a classic: buy when RSI crosses back above 30 while price is above its 50-period EMA.
The Lab ships with ready-made example graphs. Drop one in, then tweak it. It’s the fastest way to learn what a healthy strategy looks like before you build from scratch. You can also describe an idea in plain English to the AI assistant and have it assemble a valid graph on the canvas for you.
Place the bricks
Open the toolbox and add these bricks to the canvas:
- Price feed (data) — your OHLCV bars. Set the source, e.g.
ES 5m. - RSI (indicator) — length
14. - Constant (indicator) — value
30. - EMA (indicator) — length
50. - A crosses above B and A > B (logic).
- AND (logic) — combine the two conditions.
- Enter when (entry) and Stop / target exit (risk).
Wire them up
Drag from one brick’s output port to another’s input port. Ports are typed and color-coded — only matching colors connect. A blue series output can only land on a blue series input, an orchid signal only on a signal, and so on. If a wire won’t snap, the types don’t match — that’s the engine protecting you from a meaningless graph. The full list of port types and their colors lives in The Lab.
Price feed ─close→ RSI ─out→ ┐ Constant(30) ─out→ ───────────┴→ A crosses above B ┐ Price feed ─close→ EMA(50) ─out→ ┐ ├→ AND ─signal→ Enter when ─entries→ Stop/target exit Price feed ─close→ ──────────────┴→ A > B ─signal→ ┘ ▲ ▲ Price feed ─bars→ ─────────────────────────────────────────────────┘ (timing) ──bars────────┘
The two logic conditions (RSI cross + price-above-EMA) feed an AND, which feeds the entry. The entry and the exit both take the raw bars so they know the timing and price path. The exit is the terminal brick — it’s what produces a result.
3. Run a backtest
Press Run. The engine compiles your graph into a portable spec, replays it bar-by-bar over historical data, and simulates every trade through a stop/target barrier (with costs). In a second or two the results drawer slides up.
Your graph is compiled to a JSON strategy spec and POSTed to the engine’s /backtest endpoint. The spec is pure data — a list of nodes, their params, and the edges between them. There is no code in it to execute, which is what makes strategies safe to share later.
4. Read the verdict
The drawer shows the same stats three times, over three slices of history:
- All — every signal in the dataset.
- Dev — the development slice you’re allowed to iterate against.
- Holdout — a locked slice the engine never let you tune on.
For each slice you get four numbers:
n— number of trades. Too few and nothing is significant.win— fraction of trades that hit the target before the stop.rr— realized reward-to-risk ratio.expectancy— average profit per trade, net of costs, in risk units. This is the number that matters.
At the top sits the verdict — a plain-English judgement like NO EDGE net of costs. Do not argue with it. The whole point of TradeBricks is that this string is honest even when it’s disappointing.
The only number that counts is expectancy on the Holdout slice — the data you never tuned against. If Dev looks great but Holdout is flat or negative, you’ve found a pattern in noise, not an edge. The Backtesting page explains exactly why, and how the overfitting guards quantify it.
Where to go next
- Learn the canvas in depth → The Lab
- Browse every brick → Brick reference
- Let the assistant build for you → The AI assistant
- Add live & alternative data → Live & alt-data
- Understand the verdict for real → Backtesting & overfitting

