> For the complete documentation index, see [llms.txt](https://timenest.gitbook.io/timenest-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://timenest.gitbook.io/timenest-docs/bektest.md).

# Бэктест

Бэктест позволяет последовательно открывать свечи и проверять торговую идею без просмотра будущих данных.

![Настройки бэктеста](https://content.gitbook.com/content/UYEtiNLE6oJg86ZWWkX5/blobs/TF6eYwbVJc2am5jztCAq/assets/02-backtest-settings.png)

## Перед стартом

Выберите режим, баланс, биржу, таймфрейм, плечо и риск на сделку. Для исторического режима укажите монету и период. Для случайного режима TimeNest сам выбирает монету и участок истории. Для Forex и индексов выберите категорию и инструмент.

![Выбор валюты или индекса](https://content.gitbook.com/content/UYEtiNLE6oJg86ZWWkX5/blobs/dB3oQ2GyTePVLbXYrOec/assets/03-backtest-markets.png)

## Управление сессией

После запуска появляются график, текущая свеча, цена и панель управления:

* «Возобновить» запускает последовательное добавление свечей;
* «+1 свеча» добавляет один шаг;
* «+10» добавляет десять шагов;
* скорость меняется в селекторе справа;
* «Закончить» завершает сессию;
* «Сохранить и выйти» оставляет результаты в истории.

![Активный бэктест](https://2655355719-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYEtiNLE6oJg86ZWWkX5%2Fuploads%2FUmcBJHzN7SloSwfg4ee0%2Fdocs-backtest-real-20260930.png?alt=media\&token=8c459fcc-7671-4ff6-9250-fae879ba9fa4)

## Сделка в бэктесте

Нарисуйте Long или Short, проверьте Entry, TP, SL и риск, затем откройте позицию. У сделки можно добавить несколько тейк-профитов, изменить их перетаскиванием и закрыть сделку вручную кнопкой «Закрыть сделку». При частичном закрытии используется «Закрыть %».

Результат учитывает размер позиции, направление, комиссию от торгового объёма и фактическую цену закрытия. Плечо влияет на маржу и доступный размер позиции, но не превращает риск в произвольный множитель прибыли.

## История

Закрытые сделки отображаются в списке результатов с Entry, исходными TP/SL, фактическим выходом, комиссией, PnL и причиной закрытия. Если сделок больше видимой области, список прокручивается отдельно.


---

# 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://timenest.gitbook.io/timenest-docs/bektest.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.
