> For the complete documentation index, see [llms.txt](https://docs.botmanager.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.botmanager.io/misc/ruleset-examples-for-automation/dynamic-sl-in-profit.md).

# Dynamic SL when in Profit

## Explanation

With this rule, you have the possibility to lock your profits with a stoploss.

In this example, when a deal reaches 2%, a stoploss will be set or replaced with a deviation of 1% to the current PnL.

If the price (PnL) rises, the stoploss will also rise.

![](https://2840206233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MieWdIBRoT06HGdZDGB%2Fuploads%2FX1OpQznrF9KQUciI2AFQ%2Fimage.png?alt=media\&token=94a7cd46-1bbb-416b-9e51-435edfc9c3f5)

## Download

{% file src="/files/JzGtnMo8VIQRNEjvHhJp" %}
