# Lógica de procesamiento de señales

La lógica para el ajuste de posición: **Cualquiera (both)**

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/6783a6d4-9cf4-4c2c-b4d2-6c21d8151da8/image.png" alt="" width="563"><figcaption></figcaption></figure>

## Señal de compra

```
"side": "buy",
```

| **Apertura de la posición** | **Acción**                                                                             |
| --------------------------- | -------------------------------------------------------------------------------------- |
| Sin posición abierta        | Abrir una posición **Long.**                                                           |
| Long                        | Promedio de posiciones **Long** si se permite en los ajustes de la señal.              |
| Short                       | Cerrar o invertir una posición **Short** si está permitido en los ajustes de la señal. |

## Señal de venta

```
"side": "sell",
```

| **Apertura de la posición** | **Acción**                                                                            |
| --------------------------- | ------------------------------------------------------------------------------------- |
| Sin posición abierta        | Abrir una posición **Short.**                                                         |
| Long                        | Cerrar o invertir una posición **Long** si está permitido en los ajustes de la señal. |
| Short                       | Promedio de posiciones **Short** si se permite en los ajustes de la señal.            |

**¿Tiene alguna duda? Podemos ayudarle en nuestro chat de Telegram.**

{% embed url="<https://t.me/finandyes>" %}


---

# 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.finandy.com/es/algo-trading/signals-tradingview/signal-processing-logic.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.
