---
id: "T:cAlgo.API.RelativeStopLossProtection"
kind: "record"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# RelativeStopLossProtection (record)

Represents a stop loss defined as a distance (in pips) from the order's entry price.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class RelativeStopLossProtection
```

Available since cAlgo.API 5.8.

## Examples

C#:

```csharp
var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));
var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, "myLabel", new RelativeStopLossProtection(20), takeProfits);
if (result.IsSuccessful)
    Print("Stop loss price: {0}", result.Position.StopLoss);
```

Python:

```python
takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))
result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, "myLabel", RelativeStopLossProtection(20), takeProfits)
if result.IsSuccessful:
    api.Print(f"Stop loss price: {result.Position.StopLoss}")
```

## Constructors

- `public RelativeStopLossProtection(double Distance)` — Represents a stop loss defined as a distance (in pips) from the order's entry price. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Constructor/index.md)
- `public RelativeStopLossProtection(RelativeStopLossProtection original)` —  [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Constructor/index.md)

## Properties

- `public double Distance {get; set;}` — The stop loss distance, in pips, from the order's entry price. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeStopLossProtection/Distance/index.md)

