# Entry rules

## Overview

**Entry rules** define **when your agent opens a position**, whether it's a buy (Long) or a sell (Short). They are part of the [description](/agents/create-an-agent/description.md) you write in natural language.

{% hint style="info" %}
**Good to know:**

* In **trading**, an agent must include both **entry and exit rules** to manage positions actively.
* In **investing**, you can define entry rules only if you wish to accumulate assets without systematic selling.
  {% endhint %}

***

## What can Obside's AI currently do?

Obside's AI keeps improving, and we ultimately aim to support automation of all kinds of strategies, even the most complex ones.

A wide range of possibilities is available, including:

### Using different timeframes

The agent's backtest runs on the timeframe you specify in your rules. You can **combine conditions occurring on different timeframes**. For example, one condition must hold on a 1-hour chart, while another must hold on a 15-minute chart. Specify the timeframe to analyze for each condition involving a different unit.

The smallest available timeframe is **1 minute** (depending on your plan).

{% hint style="info" %}
**Examples:**

"Buy if the RSI is below 30 on the 1-hour chart and the 50-period moving average crosses above the 200-period moving average on the 4-hour chart."

"Enter long if the price breaks the high of the last 20 candles on the 1-minute chart, but only if the trend is bullish on the 1-hour chart."
{% endhint %}

### Managing rule timing

Not all entry conditions need to occur simultaneously. You can wait for one condition to materialize, then wait for another. This is the **timing of events**. Be **explicit and clear** when writing your rules so the AI understands the timing you have in mind.

{% hint style="info" %}
**Examples:**

"Take a short position if the RSI exceeds 70, then drops back below this level within the next 5 candles."

"If a bullish crossover of the 50 and 200 moving averages occurs, then wait for a bullish candle to close above the 200 moving average before buying."

"Sell if the MACD crosses below its signal line and at the same time the RSI is bearish."
{% endhint %}

### Using technical indicators

You can include [**technical indicators**](/agents/create-an-agent/indicators-list.md) in your rules. Obside lets you **combine multiple indicators** within a single agent, on different timeframes and timings.

Each indicator uses default values. If you want to use a different value or parameter for an indicator, simply specify it in your rules. For example: "We use the RSI with a period of 35" or "RSI (35)".

{% hint style="success" %}
You can also select and configure an indicator **directly from the chat** through the **Add** → **Indicators** button. It's then automatically referenced in your conversation with its parameters.
{% endhint %}

{% hint style="danger" %}
Using an indicator not included in the available indicators list could trigger an interpretation error or a backtest failure.
{% endhint %}

### Using Japanese candlestick patterns

You can include **chart patterns** and **Japanese candlestick structures** (candles) in your agent's rules. Many patterns are understood by our AI, including the most common ones (engulfing, morning star, three white soldiers, etc.).

{% hint style="info" %}
**Examples:**

"Buy when the price forms a bullish engulfing after three consecutive red candles."

"Buy after the formation of a bullish hammer with a lower wick representing at least 50% of the candle."

"Buy when three white soldiers form on a 1-hour chart."
{% endhint %}

### Using measurement units

You can use units of measure such as **pips, prices, ticks, percentages, ATR multiples (volatility) or time**. You can even specify from which reference point a measurement should apply. This reference point can be a moment in time, or a price or indicator value.

{% hint style="info" %}
**Examples:**

"If the price drops 2% from the previous day's close, then…"

"When the maximum price of the last two weeks is exceeded by 2 pips, buy."

"When the average price of the last 20 days rises for 4 consecutive days, then…"
{% endhint %}

### Custom risk and position sizing management

Obside lets you dynamically adjust your position size based on specific criteria. You can define evolving rules to manage risk based on trade outcomes or other market conditions.

{% hint style="info" %}
**Examples:**

"Start with a 0.5% risk, then decrease it by 10% on a losing trade and increase it by 5% on a winning trade."

"Invest $50 in Bitcoin every week. If BTC's price is below its 200-day moving average, double my investment."

"I want to risk 1% of my capital on Tesla stock if the price is below the EMA 200, or 0.5% if the price is above."
{% endhint %}

### Asset correlations

With Obside, your trading decisions can be influenced by the behavior of other assets. You can trigger orders based on conditions observed on another market.

{% hint style="info" %}
**Example:**

"Buy Bitcoin with 5% of my capital when the NASDAQ rises for 3 consecutive days."
{% endhint %}

### Time-based execution

Obside's AI handles precise time conditions to execute your orders. You can specify **fixed hours** or use **events tied to market sessions**.

{% hint style="info" %}
**Examples:**

"Buy at 2 PM UTC."

"Buy at the New York session open."
{% endhint %}

### Mid- to long-term investing concepts: DCA and rebalancing

Obside supports strategies tailored for long-term investors, including **Dollar Cost Averaging (DCA)** and **portfolio rebalancing**.

{% hint style="info" %}
**Examples:**

"I want to DCA (Dollar Cost Averaging) $30 into Bitcoin every first Monday of the month at 10 AM."

"Build a portfolio of 30% Bitcoin, 40% S\&P 500 and 30% CAC40. Each quarter, invest $500 and rebalance the portfolio to maintain this allocation."
{% endhint %}

***

For complete description examples, see [Example requests](/agents/create-an-agent/examples.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/agents/create-an-agent/entry-rules.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.
