---
id: "M:cAlgo.API.StopLossBreakEven.#ctor(System.Double,System.Double)"
kind: "constructor"
type: "T:cAlgo.API.StopLossBreakEven"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Constructor/"
---

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

# StopLossBreakEven constructor

Member of [StopLossBreakEven](https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/index.md).

## StopLossBreakEven(double triggerDistance, double offset)

Initializes a new instance of the [`StopLossBreakEven`](https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/index.md) record.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public StopLossBreakEven(double triggerDistance, double offset)
```

Python:

```python
StopLossBreakEven(triggerDistance: float, offset: float)
```

### Parameters

- `triggerDistance` (`double`, Python `float`): The distance in pips that activates the break-even rule. Must be greater than 10 pips.
- `offset` (`double`, Python `float`): The offset in pips applied to the entry price when the stop loss is moved.

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
var position = Positions.Find("myLabel");
if (position != null)
{
    var result = position.ModifyStopLossBreakEven(new StopLossBreakEven(20, 1));
    Print("Break-even rule set: {0}", result.IsSuccessful);
}
```

Python:

```python
position = api.Positions.Find("myLabel")
if position is not None:
    result = position.ModifyStopLossBreakEven(StopLossBreakEven(20, 1))
    api.Print(f"Break-even rule set: {result.IsSuccessful}")
```

## StopLossBreakEven(StopLossBreakEven original)



Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public StopLossBreakEven(StopLossBreakEven original)
```

Python:

```python
StopLossBreakEven(original: StopLossBreakEven)
```

### Parameters

- `original` (`StopLossBreakEven`, Python `StopLossBreakEven`):

Available since cAlgo.API 5.8.

