# Write your first strategy

> Go from a plain English idea to a scored backtest, by typing, clicking, or chatting.

Source: https://docs.texttoquant.com/guides/first-strategy

---

This guide takes you from a blank terminal to a graded backtest. You can build a strategy three ways:
they all compile to the same engine, and you can switch between them at any time.

## 1. Describe the idea

<Steps>
  <Step n={1} title="Type it in plain English">
    In the terminal, write the strategy the way you'd say it: direction, asset, entry, exit,
    timeframe, window. The parser fills in sensible defaults and marks them with amber chips so you
    can confirm or change them.
  </Step>
  <Step n={2} title="Or build it visually">
    Prefer no syntax? The visual builder is point and click condition trees: add indicator, price
    and pattern conditions, group them with AND / OR or run them in sequence, and set stops, sizing
    and direction. Every visual strategy reads back as text and runs on the same engine.
  </Step>
  <Step n={3} title="Or refine it by chat">
    The AI copilot is a chat panel in the builder. Ask for a change, "add a 2% stop", "take profit
    at 2R", "switch to 4h", and it proposes a reviewable card you apply or dismiss. Nothing changes
    without your click.
  </Step>
</Steps>

<RunInTerminal query="Buy BTC when RSI(14) crosses above 30, exit at 3R or a 2% stop, on the 4h for the last 90 days" />

## 2. Check what was parsed

Open the parsed strategy card and confirm the pieces before you spend a run: asset, timeframe,
direction, entry/exit conditions, stops and sizing. Edit anything inline: periods, thresholds,
SL/TP, direction, then save.

<Callout variant="tip" title="Complete the query first">
  A query needs an asset, an entry, an exit, a timeframe and a window to run well. The completeness
  hints and the Rephrase tool nudge you toward a full query before you spend a backtest.
</Callout>

## 3. Run and read

Hit run. In a few seconds you get summary metrics, an annotated chart, the trade ledger, robustness
checks and a letter grade.

Next: learn to [read the report](/docs/guides/read-a-report), then
[validate the idea](/docs/guides/validate-an-idea) before you trust it.
