> For the complete documentation index, see [llms.txt](https://docs.bigbeluga.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bigbeluga.com/backtesters/smart-money-backtester/exit-conditions.md).

# Exit Conditions

These settings define when a **long (buy) or short (sell) trade** should be closed. Each condition is checked sequentially to confirm an exit signal.

***

<div><figure><img src="/files/RdYe3qXusYuSqszNqyp5" alt=""><figcaption></figcaption></figure> <figure><img src="/files/rnP9p7V4CdyDUj7TPFAW" alt=""><figcaption></figcaption></figure></div>

***

* <mark style="color:$primary;">**Exit 1**</mark> – Closes a position based on market structure shifts, such as **Change of Character (CHoCH)** or **Break of Structure (BOS)** in the opposite direction.
* <mark style="color:$primary;">**Exit 2-3**</mark> – Uses price-based conditions, such as the **closing price reaching a specific level or being equal to a set value**.
* <mark style="color:yellow;">**Step**</mark> – Determines the sequence in which conditions must be met before confirming an exit.

***

Long exits signal bearish reversals, while short exits trigger on bullish reversals.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.bigbeluga.com/backtesters/smart-money-backtester/exit-conditions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
