> For the complete documentation index, see [llms.txt](https://help.defisaver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.defisaver.com/automations/stop-loss-take-profit.md).

# Stop Loss / Take Profit

A classic combo, the Take Profit and Stop Loss options allow you to configure target price points at which your position would be fully closed, with your position's whole current debt cleared using collateral.

{% hint style="info" %}
*These options are typically used as liquidation protection and a way to limit and minimize losses or maximize gains.*
{% endhint %}

To activate Take Profit / Stop Loss, please follow these steps:<br>

1. Open up your position and navigate to the "Automate" tab:

<figure><img src="/files/x6ml3FIdDOiCdyd1E3Yg" alt=""><figcaption></figcaption></figure>

2. Choose "Take Profit" or "Stop Loss"
3. Input what amount the collateral asset should be under (for Stop Loss) or over (for Take Profit), and whether you want to close to collateral or debt.

<figure><img src="/files/UZIdpI2SMmbABfpLI4SG" alt=""><figcaption></figcaption></figure>

4. Press "Enable"

{% hint style="info" %}
*The "Close (to X)" represents which asset will be withdrawn to your EOA wallet once the position is fully closed.*\
\
*To understand this in more detail, let's look at how the "Close" tool works in the background:*

* *First, it flash loans the debt asset*
* *It uses the flash loaned funds to pay back all of the debt*
* *Now that your collateral is freed up, it's withdrawn*
* *The collateral is then swapped to the debt asset*&#x20;
* *This is used to pay back the flash loan*
* *The remaining funds are withdrawn to your EOA*

\
*Now, if you choose "Close to Collateral", this means that it will only swap enough of your collateral to cover the flash loan, but it will withdraw the rest in the collateral token.*\
\
*If you choose "Close to Debt", it's going to swap all of your collateral to the debt asset, pay back the flash loan, and the rest will be withdrawn in the debt token.*
{% endhint %}

***

## Related Articles:

* [Automation fees](https://help.defisaver.com/automations/fees)
* [Automation compatibility](https://help.defisaver.com/automations/compatibility)
* [What are Automations?](https://help.defisaver.com/automations/what-are-automations)
* [Requirements for using Automations](https://help.defisaver.com/automations/requirements-for-using-automation)
