> ## Documentation Index
> Fetch the complete documentation index at: https://docs.everstrike.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Writing Strategy Prompts: Rules the AI Can Follow

> How to write an AI strategy prompt that works: specific entry, exit and risk rules, data the AI can see, sizing limits, and language.

The prompt is the most important part of a strategy. These guidelines make the AI's decisions match your intent.

## Be specific

Give every rule a threshold and a direction:

* "Buy when RSI(14) crosses above 30", not "buy when it's oversold".
* "Exit when the price closes below the 50 EMA", not "exit when the trend ends".

Prompts can be up to **5,000 characters**. Clear and unambiguous beats long.

## Cover entry, exit and holding

Write when the strategy should:

* **enter**,
* **exit**: the AI can close positions on conditions you describe,
* **hold** rather than trade.

A strategy with detailed entries and vague exits makes inconsistent exits.

## Set the risk in numbers

* A **stop-loss** and **take-profit**, as percentages.
* A **maximum position size**, for example "Maximum position size: \$3,000". The AI respects position limits you provide.
* Or a **target position size**, which the AI maintains as the market moves.

The **Max Trade Quantity** setting caps each order separately. Start with a low value.

## Use data the AI can see

The AI can only use the data in [Supported Data](https://docs.everstrike.io/ai/supported-data.md). It can't see news, social media, company fundamentals, whale or exchange flows, Ethereum gas, or forecasts for economic releases, and it can't analyse chart images.

* Moving averages are available with 9, 20 and 50 periods.
* Indicators show the 5 most recent values by default.
* The AI uses **UTC** for time.
* [Extra data sources](https://docs.everstrike.io/ai/supported-data.md#extra-data-sources) must be added to the strategy's input data, and send their latest value only.

> [!TIP]
>
> When you mention an extra data source in a prompt, the prompt check flags it and **Add** puts it in the strategy's input data for you.

## Language

You can write prompts in any commonly used language; English generally gives the best results. To get the AI's reasoning in your own language, say so in the prompt.

## Test before you scale

Run a [Fast Estimate](https://docs.everstrike.io/ai/fast-estimates.md) first, start with a low order quantity, and read the strategy's [events](https://docs.everstrike.io/ai/events.md) before increasing size.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.