> For the complete documentation index, see [llms.txt](https://docs.swoop.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swoop.fun/swoop-ru/rasshirenie-swoop/nastroika-rasshireniya-swoop-+/teik-profit-i-stop-loss+.md).

# Тейк-профит и стоп-лосс+

Автоматическое закрытие позиции по тейк-профиту и стоп-лоссу

#### Как это работает

Тейк-профит закрывает позицию при росте цены, стоп-лосс — при падении. Оба уровня задаются в процентах от цены входа.

Когда функция включена, ордера выставляются автоматически при каждой покупке: тейк-профит выше цены входа, стоп-лосс ниже. При достижении уровня позиция закрывается по рынку.

<div align="left" data-with-frame="true"><figure><img src="https://3232391525-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnogzgYvDfAFQQLJ48fP7%2Fuploads%2FGxKTkoD0JXQng5JDxqmH%2Fimage.png?alt=media&amp;token=a9d7b8a5-ecfa-48ed-81e5-6c4cc2c53254" alt="" width="375"><figcaption></figcaption></figure></div>

**Особенности**

* Функция остаётся включённой при переходе на другой токен, пока её не выключить
* Ордера выставляются в момент покупки, а не в момент включения функции
* При повторной покупке того же токена выставляется отдельный набор ордеров

***

### Где настроить

Настройки расширения открываются по шестерёнке.&#x20;

<div align="left" data-with-frame="true"><figure><img src="https://3232391525-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnogzgYvDfAFQQLJ48fP7%2Fuploads%2F7vNPWttZMzNzMrlaMrjx%2Fimage.png?alt=media&amp;token=ddf9973b-f523-4139-973a-8d61cb4d6c44" alt="" width="375"><figcaption></figcaption></figure></div>

Раздел `Advanced Trade`, блок `Take profit/Stop loss` — внизу, под лимитными ордерами и дев селлом.

<div data-with-frame="true"><figure><img src="https://3232391525-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnogzgYvDfAFQQLJ48fP7%2Fuploads%2Flctgh7dsOIlvhdiJ9uu5%2Fimage.png?alt=media&amp;token=d3f524cf-8c44-4952-86f8-51a5a8f9d679" alt=""><figcaption></figcaption></figure></div>

Кнопка `Add TP/SL` добавляет строку.&#x20;

<div data-with-frame="true"><figure><img src="https://3232391525-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnogzgYvDfAFQQLJ48fP7%2Fuploads%2F6MA957efO1DNeXoXL3x7%2Fimage.png?alt=media&amp;token=ec39683a-a419-4760-bd33-740646188809" alt=""><figcaption></figcaption></figure></div>

Настройки тейк-профита и стоп-лосса

| Поле        | Что задаёт                                                       |
| ----------- | ---------------------------------------------------------------- |
| TP/SL       | Тип уровня: TP фиксирует прибыль, SL ограничивает убыток         |
| Trigger (%) | Насколько цена должна уйти от цены входа, чтобы уровень сработал |
| Amount (%)  | Какая доля позиции закроется при срабатывании                    |

#### Как считаются проценты(нюансы)

Trigger отсчитывается от цены входа. Для TP значение 50 означает рост на 50%, для SL значение 20 — падение на 20%. Знак минус не ставится.

Amount отсчитывается от первоначального объёма входа, а не от остатка позиции. При входе на 1 SOL и двух строках TP с Amount 40% и 60% закрывается 0.4 SOL и 0.6 SOL.

Если сумма Amount меньше 100%, остаток позиции автоматически не закрывается. Две строки TP с Amount 50% и 30% закроют 80% позиции, оставшиеся 20% закрываются вручную.

***

### Если не хватает баланса

Закрытие позиции — отдельная транзакция, на неё нужна комиссия. Если весь баланс израсходован на покупку, продажа не пройдёт и появится ошибка `Insufficient balance to close the position with TP/SL`. На кошельке следует оставлять запас SOL.

#### Комиссии

Bribe и priority для ордеров TP/SL берутся из настроек лимитных ордеров.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.swoop.fun/swoop-ru/rasshirenie-swoop/nastroika-rasshireniya-swoop-+/teik-profit-i-stop-loss+.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
