# Create a trading bot

## Overview

A **trading bot** is an agent that follows **defined rules** to open and close positions, with no human intervention. Unlike a one-off trade, it runs **continuously** on the assets and timeframe you choose.

A bot is the ideal tool to automate:

* A systematic strategy based on technical indicators.
* A progressive investment plan (DCA, rebalancing).
* Complex entry and exit rules combining multiple conditions.

## How to phrase your request

Describe your strategy as if you were teaching it to someone: **which assets**, **when to enter**, **when to exit**, **how to manage risk**.

{% hint style="success" %}
A good way to write clear rules is to ask yourself:

"If I were teaching my strategy to someone else using only these rules, would they understand everything or would they have questions on unclear aspects?".

This approach helps you maximize the precision of your rules.
{% endhint %}

To go deeper on rule writing, see [Description in natural language](/agents/create-an-agent/description.md), [Entry rules](/agents/create-an-agent/entry-rules.md) and [Exit rules](/agents/create-an-agent/exit-rules.md).

## Example requests

{% hint style="info" %}
**Example #1 — Recurring DCA bot with filter**

"DCA $200 into Bitcoin every Friday, and skip the buy if the RSI is above 70 on the daily."
{% endhint %}

{% hint style="info" %}
**Example #2 — Mean reversion**

"Buy $1,000 of SPY whenever it closes more than 2% below its 20-day moving average, sell when it returns to the average."
{% endhint %}

{% hint style="info" %}
**Example #3 — News-driven bot**

"Buy $500 of TSLA whenever Tesla unveils a new model, and sell after 5 trading days."
{% endhint %}

For more examples (short-term trading, long-term investing, multi-asset), see [Example requests](/agents/create-an-agent/examples.md).

***

## What's next?

Once the bot is created, it becomes an agent that you can:

* **Backtest** on up to 20 years of historical data to evaluate past performance.
* **Run in demo mode** (paper trading) to see how it behaves in real time without risk.
* **Run in live mode** on a supported broker (depending on your region).

See [Backtest an agent](/agents/backtest-an-agent.md) and [Run an agent](/agents/run-an-agent.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.obside.com/obside-chat/automate-your-trading/create-a-trading-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
