# Your first strategy

> How a plain English sentence becomes a backtest.

Source: https://www.texttoquant.com/academy/first-strategy
Level: Beginner · 4 min · lesson 1 of 12

---

You don't write code. You describe the rules, and TextToQuant compiles your sentence into an exact, deterministic strategy and runs it on real history. Let's build the simplest possible one.

## You describe, the engine compiles

Type what you want in plain English. The engine turns it into a precise set of rules: an entry, an exit, a market, a timeframe, with no hidden decisions. Before it runs, it shows you the parsed rules. Read them, because that is exactly what's being tested.

## The hello world of trend following

A moving average crossover is the classic starting point. When a faster average crosses above a slower one, recent prices have pulled ahead of older ones, which is a simple, mechanical definition of 'an uptrend started'. Run it and watch where it enters and exits on the chart.

## Every strategy needs a window

Notice the sentence ends with a timeframe and a window: daily bars, the last 3 years. The engine will not run without a window, because a backtest is always a claim about one specific stretch of history. Leave it out and the terminal stops and asks for one. Say it up front and you also make the result honest: three years of daily bars is what this number is about, nothing more.

## Try it

```
Buy BTC when the 50 day moving average crosses above the 200 day, sell when it crosses back below, on 1D, last 3 years.
```

Run it: https://www.texttoquant.com/terminal?q=Buy%20BTC%20when%20the%2050%20day%20moving%20average%20crosses%20above%20the%20200%20day%2C%20sell%20when%20it%20crosses%20back%20below%2C%20on%201D%2C%20last%203%20years.&parse=1

**Takeaway:** Read the parsed rules it shows you before running. That is the exact strategy being tested, with no hidden AI decisions.

## Check yourself

When you run a sentence, what exactly gets tested?

1. Whatever an AI decides you meant, which can change from run to run
2. The rules the engine parsed from your sentence, shown to you before the run
3. The sentence itself, matched against the chart word by word

Answer: 2. The parsed rules are the strategy. There are no hidden decisions, so reading them first is how you know what the result is about.

Terms used: [moving-average](https://www.texttoquant.com/academy/glossary#moving-average), [breakout](https://www.texttoquant.com/academy/glossary#breakout)
