# Your first strategy

> From a starter to a strategy running on paper in five steps, on the site or with your AI. No code needed to begin.

Every strategy on ftw.trade goes through the same five steps. Learn them once and they work for everything from a moving-average cross to a hedged liquidity range.

```steps
### Pick a market
Open Strategies and choose what it runs on: a pool, a perp on Hyperliquid or Lighter, a price feed such as BTC/USD, or a Polymarket outcome. Anything you've added under Sources shows up here, with how far back its history goes.
### Start from a starter
Pick one of the starters (EMA crossover, RSI reversion, Breakout, Momentum, Funding fade and more). Each is short Flowscript you can read, with its settings as knobs. Or ask the assistant: "write me a strategy that buys ETH dips below the 4-hour lower Bollinger band".
### Backtest it
Run it over the last 30 days, or any window. Read the report: the equity curve against buy-and-hold, every trade, fees, drawdown, and any trigger that never fired and why.
### Run it on paper
Start a run. It decides on every closed bar from now on, with its own paper book, and keeps going on ftw.trade's servers whether your browser is open or not.
### Watch it
The Running table shows its equity, its latest metrics and its trades. Add a dashboard to watch it in one place, or share it.
```

## The same thing from your AI

With ftw.trade connected to Claude or ChatGPT ([Connect your AI](https://docs.ftw.trade/agents/connect)), one message does all five:

```text
Backtest an EMA 12/26 crossover on Hyperliquid ETH, 1h bars, over the last 90 days.
If it beats holding ETH, run it on paper and make me a dashboard for it.
```

## The same thing from the terminal

```sh
npx ftw-trade login
npx ftw-trade strategies backtest ema.flow --series feed:btc-usd-chainlink --interval 1h
npx ftw-trade strategies run ema --series feed:btc-usd-chainlink --interval 1h
```

> [!NOTE] Coming soon
> The `ftw-trade` CLI goes up on npm closer to launch. Until then, use the site or your AI.

## What a starter looks like

```flowscript
// params: fastLen=12, slowLen=26, size=100
const close = bars.close(market, interval);
const fast = ema(close, fastLen);
const slow = ema(close, slowLen);
metric("fast", fast);
metric("slow", slow);

when (crossover(fast, slow) && !inPosition()) { paper.buy({ quote: size }); }
when (inPosition() && crossunder(fast, slow)) { paper.sell({}); }
```

It reads the market's closes, computes two averages, publishes both so you can chart them, buys once when the fast one crosses above the slow one, and sells when it crosses back. [Flowscript in five minutes](https://docs.ftw.trade/flowscript/overview) explains every line.

## Next

```cards
- [Pick a starter by goal](https://docs.ftw.trade/strategies/starters): Trend, reversion, funding, order books, options and liquidity.
- [Backtest and optimize](https://docs.ftw.trade/strategies/backtest): Reading the report, holdouts and walk-forward.
- [Take it to real money](https://docs.ftw.trade/strategies/real-money): The checklist before a strategy trades for real.
```
